The package rpms/llvm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/llvm.git/commit/?id=40207a4ea9b40....
Change:
+%ifarch s390x
Thanks.
Full change:
============
commit 40207a4ea9b403024b3270734ab58cd5f52b0c44
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Tue Aug 4 13:29:13 2020 -0700
Backport upstream patch to fix build with -flto.
Also disable LTO on s390x to work-around unit test failures.
diff --git a/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
b/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
new file mode 100644
index 0000000..2f7ea76
--- /dev/null
+++ b/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
@@ -0,0 +1,50 @@
+From 352558e69b3691cfdc8e1adc2a1fbb737bc67cbb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny(a)gentoo.org>
+Date: Tue, 16 Jun 2020 12:16:52 +0200
+Subject: [PATCH] [llvm] Avoid linking llvm-cfi-verify to duplicate libs
+
+Fix the CMake rules for LLVMCFIVerify library not to pull duplicate
+LLVM .a libraries when linking to the dylib. This prevents problems
+due to duplicate symbols and apparently fixes mingw32.
+
+This is an alternative approach to D44650 that just forces .a libraries
+instead. However, there doesn't seem to be any reason to do that.
+
+Differential Revision:
https://reviews.llvm.org/D81921
+---
+ llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 +++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
+index 82ca42e624a..41d55ed9321 100644
+--- a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
++++ b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
+@@ -7,13 +7,17 @@ add_library(LLVMCFIVerify
+ )
+
+ llvm_update_compile_flags(LLVMCFIVerify)
+-llvm_map_components_to_libnames(libs
+- DebugInfoDWARF
+- MC
+- MCParser
+- Object
+- Support
+- Symbolize
+- )
++if (LLVM_LINK_LLVM_DYLIB)
++ set(libs LLVM)
++else()
++ llvm_map_components_to_libnames(libs
++ DebugInfoDWARF
++ MC
++ MCParser
++ Object
++ Support
++ Symbolize
++ )
++endif()
+ target_link_libraries(LLVMCFIVerify ${libs})
+ set_target_properties(LLVMCFIVerify PROPERTIES FOLDER "Libraries")
+--
+2.18.1
+
diff --git a/llvm.spec b/llvm.spec
index 98939ed..8ee953b 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -11,7 +11,7 @@
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#%%global rc_ver 6
-%global baserelease 9
+%global baserelease 10
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 10
%global min_ver 0
@@ -62,6 +62,7 @@
Patch0: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
Patch1: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
%endif
Patch2: bab5908df544680ada0a3cf431f55aeccfbdb321.patch
+Patch3: 0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@@ -175,6 +176,15 @@ pathfix.py -i %{__python3} -pn \
%build
+# Disable LTO on s390x, this causes some test failures:
+# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.Authenticated
+# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.PATCHPOINT
+# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.STACKMAP
+# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.TLSDESC_CALLSEQ
+%ifarch s390x
+%global _lto_cflags %{nil}
+%endif
+
%ifarch s390 %{arm} %ix86
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
@@ -517,6 +527,10 @@ fi
%endif
%changelog
+* Tue Aug 04 2020 Tom Stellard <tstellar(a)redhat.com> - 10.0.0-10
+- Backport upstream patch to fix build with -flto.
+- Disable LTO on s390x to work-around unit test failures.
+
* Sat Aug 01 2020 sguelton(a)redhat.com - 10.0.0-9
- Fix update-alternative uninstall script
commit a58113d73ce9fcac0acacd7bed3baae7d9754c55
Author: serge-sans-paille <sguelton(a)redhat.com>
Date: Fri Jul 31 13:23:06 2020 +0000
Fix update-alternative uninstall script
diff --git a/llvm.spec b/llvm.spec
index 592a1e5..98939ed 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -11,13 +11,12 @@
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#%%global rc_ver 6
-%global baserelease 8
+%global baserelease 9
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 10
%global min_ver 0
%global patch_ver 0
-
%if %{with compat_build}
%global pkg_name llvm%{maj_ver}.%{min_ver}
%global exec_suffix -%{maj_ver}.%{min_ver}
@@ -262,6 +261,9 @@ pathfix.py -i %{__python3} -pn \
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits}
+# ghost presence
+touch %{buildroot}%{_bindir}/llvm-config
+
# Fix some man pages
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
@@ -293,7 +295,6 @@ install %{build_libdir}/libLLVMTestingSupport.a
%{buildroot}%{_libdir}
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
%global lit_fedora_cfg %{_datadir}/llvm/lit.fedora.cfg.py
-
# Install gtest sources so clang can use them for gtest
install -d %{install_srcdir}
install -d %{install_srcdir}/utils/
@@ -401,7 +402,7 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C
%{_vpath_buildd
%postun devel
if [ $1 -eq 0 ]; then
- %{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config
+ %{_sbindir}/update-alternatives --remove llvm-config
%{_bindir}/llvm-config-%{__isa_bits}
fi
%endif
@@ -413,6 +414,7 @@ fi
%{_bindir}/*
%if %{without compat_build}
+%exclude %{_bindir}/llvm-config
%exclude %{_bindir}/llvm-config-%{__isa_bits}
%exclude %{_bindir}/not
%exclude %{_bindir}/count
@@ -450,6 +452,7 @@ fi
%files devel
%license LICENSE.TXT
%if %{without compat_build}
+%ghost %{_bindir}/llvm-config
%{_bindir}/llvm-config-%{__isa_bits}
%{_mandir}/man1/llvm-config*
%{_includedir}/llvm
@@ -514,6 +517,9 @@ fi
%endif
%changelog
+* Sat Aug 01 2020 sguelton(a)redhat.com - 10.0.0-9
+- Fix update-alternative uninstall script
+
* Sat Aug 01 2020 sguelton(a)redhat.com - 10.0.0-8
- Fix gpg verification and update macro usage.
commit 146561a8a6797c454927235989b533f7e320aa38
Author: serge-sans-paille <sguelton(a)redhat.com>
Date: Mon Jul 13 12:27:26 2020 +0000
Fix gpg verification, update ninja macro and use %license
diff --git a/llvm.spec b/llvm.spec
index 5d558ed..592a1e5 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -11,7 +11,7 @@
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
#%%global rc_ver 6
-%global baserelease 7
+%global baserelease 8
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 10
%global min_ver 0
@@ -86,6 +86,10 @@ BuildRequires: libedit-devel
# We need python3-devel for pathfix.py.
BuildRequires: python3-devel
+# For origin certification
+BuildRequires: gnupg2
+
+
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Provides: llvm(major) = %{maj_ver}
@@ -163,6 +167,7 @@ LLVM's modified googletest sources.
%endif
%prep
+%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}'
--data='%{SOURCE0}'
%autosetup -n %{llvm_srcdir} -p2
pathfix.py -i %{__python3} -pn \
@@ -170,8 +175,6 @@ pathfix.py -i %{__python3} -pn \
tools/opt-viewer/*.py
%build
-mkdir -p _build
-cd _build
%ifarch s390 %{arm} %ix86
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
@@ -179,7 +182,7 @@ cd _build
%endif
# force off shared libs as cmake macros turns it on.
-%cmake .. -G Ninja \
+%cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -248,11 +251,11 @@ cd _build
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
# are no other compile jobs running. This will help reduce OOM errors on the
# builders without having to artificially limit the number of concurrent jobs.
-%ninja_build LLVM
-%ninja_build
+%cmake_build --target LLVM
+%cmake_build
%install
-%ninja_install -C _build
+%cmake_install
%if %{without compat_build}
@@ -268,7 +271,7 @@ mv %{buildroot}%{_mandir}/man1/tblgen.1
%{buildroot}%{_mandir}/man1/llvm-tblgen.
for f in %{test_binaries}
do
- install -m 0755 ./_build/bin/$f %{buildroot}%{_bindir}
+ install -m 0755 %{_vpath_builddir}/bin/$f %{buildroot}%{_bindir}
done
# Remove testing of update utility tools
@@ -278,9 +281,9 @@ rm -rf test/tools/UpdateTestChecks
# Install libraries needed for unittests
%if 0%{?__isa_bits} == 64
-%global build_libdir _build/lib64
+%global build_libdir %{_vpath_builddir}/lib64
%else
-%global build_libdir _build/lib
+%global build_libdir %{_vpath_builddir}/lib
%endif
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
@@ -298,8 +301,8 @@ cp -R utils/unittest %{install_srcdir}/utils/
# Generate lit config files. Strip off the last line that initiates the
# test run, so we can customize the configuration.
-head -n -1 _build/test/lit.site.cfg.py >> %{lit_cfg}
-head -n -1 _build/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
+head -n -1 %{_vpath_builddir}/test/lit.site.cfg.py >> %{lit_cfg}
+head -n -1 %{_vpath_builddir}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
# Install custom fedora config file
cp %{SOURCE2} %{buildroot}%{lit_fedora_cfg}
@@ -324,7 +327,7 @@ tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n
> %{install_srcdir}/
# Install the unit test binaries
mkdir -p %{build_llvm_libdir}
-cp -R _build/unittests %{build_llvm_libdir}/
+cp -R %{_vpath_builddir}/unittests %{build_llvm_libdir}/
rm -rf `find %{build_llvm_libdir} -iname 'cmake*'`
# Install libraries used for testing
@@ -381,7 +384,8 @@ rm -Rf %{build_install_prefix}/share/opt-viewer
%check
# TODO: Fix test failures on arm
-LD_LIBRARY_PATH=$PWD/_build/%{_lib} ninja check-all -C _build || \
+# FIXME: use %%cmake_build instead of %%__ninja
+LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_builddir} || \
%ifarch %{arm}
:
%else
@@ -403,6 +407,7 @@ fi
%endif
%files
+%license LICENSE.TXT
%exclude %{_mandir}/man1/llvm-config*
%{_mandir}/man1/*
%{_bindir}/*
@@ -422,6 +427,7 @@ fi
%endif
%files libs
+%license LICENSE.TXT
%{pkg_libdir}/libLLVM-%{maj_ver}.so
%if %{without compat_build}
%if %{with gold}
@@ -442,6 +448,7 @@ fi
%{pkg_libdir}/libRemarks.so*
%files devel
+%license LICENSE.TXT
%if %{without compat_build}
%{_bindir}/llvm-config-%{__isa_bits}
%{_mandir}/man1/llvm-config*
@@ -465,9 +472,11 @@ fi
%endif
%files doc
+%license LICENSE.TXT
%doc %{_pkgdocdir}/html
%files static
+%license LICENSE.TXT
%if %{without compat_build}
%{_libdir}/*.a
%exclude %{_libdir}/libLLVMTestingSupport.a
@@ -479,6 +488,7 @@ fi
%if %{without compat_build}
%files test
+%license LICENSE.TXT
%{_libexecdir}/tests/llvm/
%{llvm_libdir}/unittests/
%{_datadir}/llvm/src/unittests
@@ -497,19 +507,22 @@ fi
%{_libdir}/cmake/llvm/LLVMTestExports.cmake
%files googletest
+%license LICENSE.TXT
%{_datadir}/llvm/src/utils
%{_libdir}/libLLVMTestingSupport.a
%endif
%changelog
+* Sat Aug 01 2020 sguelton(a)redhat.com - 10.0.0-8
+- Fix gpg verification and update macro usage.
+
* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 10.0.0-7
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 10.0.0-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
* Thu Jun 11 2020 sguelton(a)redhat.com - 10.0.0-5
- Make llvm-test.tar.gz creation reproducible.