From 6f21bc0e93b271f53cf5bcbeac23e8d9215e390a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Nov 29 2023 13:50:23 +0000 Subject: [PATCH 1/3] Remove FEDORA_LLVM_LIB_SUFFIX handling We used to carry a patch for the lit config. We don't do this anymore so this is dead code. --- diff --git a/clang.spec b/clang.spec index e198b9c..2913c86 100644 --- a/clang.spec +++ b/clang.spec @@ -339,13 +339,6 @@ rm test/CodeGen/profile-filter.c %global _lto_cflags %nil %endif - -%if 0%{?__isa_bits} == 64 -sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py -%else -sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py -%endif - %ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') From 63b3c28c34b0b268bdb95813fa4fe4193b2b965a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Nov 29 2023 13:50:23 +0000 Subject: [PATCH 2/3] Remove redundant _lto_cflags define ThinLTO is the default. --- diff --git a/clang.spec b/clang.spec index 2913c86..1107267 100644 --- a/clang.spec +++ b/clang.spec @@ -327,8 +327,6 @@ rm test/CodeGen/profile-filter.c %build -# Use ThinLTO to limit build time. -%define _lto_cflags -flto=thin # And disable LTO on AArch64 entirely. %ifarch aarch64 %define _lto_cflags %{nil} From 88b9baf1124cec4f7dac49985d00795e299b0e51 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Nov 29 2023 13:50:23 +0000 Subject: [PATCH 3/3] Remove 32-bit arm handling, which is no longer supported --- diff --git a/clang.spec b/clang.spec index 1107267..4fbdb20 100644 --- a/clang.spec +++ b/clang.spec @@ -205,11 +205,6 @@ Recommends: libatomic%{?_isa} Recommends: libomp-devel%{_isa} = %{version} Recommends: libomp%{_isa} = %{version} -# Use lld as the default linker on ARM due to rhbz#1918924 -%ifarch %{arm} -Requires: lld -%endif - %description libs Runtime library for clang. @@ -337,7 +332,7 @@ rm test/CodeGen/profile-filter.c %global _lto_cflags %nil %endif -%ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le +%ifarch s390 s390x aarch64 %ix86 ppc64le # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif @@ -359,7 +354,7 @@ rm test/CodeGen/profile-filter.c -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DPYTHON_EXECUTABLE=%{__python3} \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -%ifarch s390 s390x %{arm} %ix86 ppc64le +%ifarch s390 s390x %ix86 ppc64le -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif @@ -409,9 +404,6 @@ rm test/CodeGen/profile-filter.c -DBUILD_SHARED_LIBS=OFF \ -DCLANG_REPOSITORY_STRING="%{?dist_vendor} %{version}-%{release}" \ -DCLANG_RESOURCE_DIR=../lib/clang/%{maj_ver} \ -%ifarch %{arm} - -DCLANG_DEFAULT_LINKER=lld \ -%endif -DCLANG_DEFAULT_UNWINDLIB=libgcc %cmake_build @@ -505,13 +497,7 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format %cmake_build --target clang-test-depends \ ExtraToolsUnitTests ClangdUnitTests ClangIncludeCleanerUnitTests ClangPseudoUnitTests # requires lit.py from LLVM utilities -# FIXME: Fix failing ARM tests -LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \ -%ifarch %{arm} -: -%else -false -%endif +LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} %endif %endif