diff --git a/SPECS/dotnet5.0.spec b/SPECS/dotnet5.0.spec index 46b6d25..7ba9f84 100644 --- a/SPECS/dotnet5.0.spec +++ b/SPECS/dotnet5.0.spec @@ -14,11 +14,11 @@ %global __provides_exclude ^(%{privlibs})\\.so %global __requires_exclude ^(%{privlibs})\\.so -# Filter flags not supported by clang -# -fstack-clash-protection -# -specs= -%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g') -%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g') +# LTO triggers a compilation error for a source level issue. Given that LTO should not +# change the validity of any given source and the nature of the error (undefined enum), I +# suspect a generator program is mis-behaving in some way. This needs further debugging, +# until that's done, disable LTO. This has to happen before setting the flags below. +%define _lto_cflags %{nil} %global host_version 5.0.4 %global runtime_version 5.0.4 @@ -56,7 +56,7 @@ Name: dotnet5.0 Version: %{sdk_rpm_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: .NET Runtime and SDK License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib URL: https://github.com/dotnet/ @@ -76,8 +76,12 @@ Patch100: runtime-linker-order.patch # Disable telemetry by default; make it opt-in Patch500: sdk-telemetry-optout.patch -# ExclusiveArch: aarch64 x86_64 +%if 0%{?fedora} > 32 || 0%{?rhel} > 8 +ExclusiveArch: aarch64 x86_64 +%else ExclusiveArch: x86_64 +%endif + BuildRequires: clang BuildRequires: cmake @@ -360,9 +364,37 @@ cat /etc/os-release cp -a %{_libdir}/dotnet previously-built-dotnet %endif -export EXTRA_CFLAGS="%{dotnet_cflags}" -export EXTRA_CXXFLAGS="%{dotnet_cflags}" -export EXTRA_LDFLAGS="%{dotnet_ldflags}" +%if 0%{?fedora} > 32 || 0%{?rhel} > 8 +# Setting this macro ensures that only clang supported options will be +# added to ldflags and cflags. +%global toolchain clang +%set_build_flags +%else +# Filter flags not supported by clang +%global dotnet_cflags %(echo %optflags | sed -re 's/-specs=[^ ]*//g') +%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g') +export CFLAGS="%{dotnet_cflags}" +export CXXFLAGS="%{dotnet_cflags}" +export LDFLAGS="%{dotnet_ldflags}" +%endif + +%ifarch aarch64 +# -mbranch-protection=standard breaks unwinding in CoreCLR through libunwind +CFLAGS=$(echo $CFLAGS | sed -e 's/-mbranch-protection=standard //') +CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-mbranch-protection=standard //') +%endif + +# -fstack-clash-protection breaks CoreCLR +CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-clash-protection//' ) +CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-clash-protection//' ) + +export EXTRA_CFLAGS="$CFLAGS" +export EXTRA_CXXFLAGS="$CXXFLAGS" +export EXTRA_LDFLAGS="$LDFLAGS" + +unset CFLAGS +unset CXXFLAGS +unset LDFLAGS #%%if %%{without bootstrap} # --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \ @@ -496,29 +528,33 @@ echo "Testing build results for debug symbols..." %changelog -* Tue Mar 02 2021 Omair Majid - 5.0.104-1 +* Tue Mar 09 2021 Omair Majid - 5.0.104-2 - Update to .NET SDK 5.0.104 and Runtime 5.0.4 -- Resolves: RHBZ#1934247 +- Resolves: RHBZ#1934241 -* Wed Feb 03 2021 Omair Majid - 5.0.103-1 +* Wed Feb 10 2021 Omair Majid - 5.0.103-2 - Update to .NET SDK 5.0.103 and Runtime 5.0.3 -- Resolves: RHBZ#1924765 - -* Tue Jan 05 2021 Omair Majid - 5.0.102-2 -- Rebuild with updated tests -- Resolves: RHBZ#1912684 +- Resolves: RHBZ#1924762 -* Mon Jan 04 2021 Omair Majid - 5.0.102-1 +* Wed Jan 13 2021 Omair Majid - 5.0.102-2 - Update to .NET SDK 5.0.102 and Runtime 5.0.2 -- Resolves: RHBZ#1912684 +- Resolves: RHBZ#1912569 -* Thu Dec 03 2020 Omair Majid - 5.0.100-0.8.0201202git337413b +* Thu Dec 03 2020 Omair Majid - 5.0.100-0.10.20201203git337413b - Update to latest commit of .NET Core SDK 5.0.100 and Runtime 5.0.0 -- Resolves: RHBZ#1897396 +- Resolves: RHBZ#1897362 + +* Thu Nov 12 2020 Omair Majid - 5.0.100-0.9 +- Update to a work-in-progres .NET 5 GA build +- Resolves: RHBZ#1897362 + +* Mon Oct 26 2020 Omair Majid - 5.0.100-0.8.rc1 +- Bump version +- Resolves: RHBZ#1891094 * Fri Oct 23 2020 Omair Majid - 5.0.100-0.7.rc1 - Update to .NET Core SDK 5.0.100 RC1 and Runtime 5.0.0 RC1 -- Resolves: RHBZ#1891507 +- Resolves: RHBZ#1891094 * Tue Sep 15 2020 Omair Majid - 5.0.100-0.6.preview8 - Switch to a smaller tarball