diff --git a/.gitignore b/.gitignore index d368b74..d01d408 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -SOURCES/llvm-14.0.6.src.tar.xz -SOURCES/tstellar-gpg-key.asc +SOURCES/cmake-15.0.7.src.tar.xz +SOURCES/llvm-15.0.7.src.tar.xz +SOURCES/release-keys.asc diff --git a/.llvm.metadata b/.llvm.metadata index 0c6a26d..f22ad14 100644 --- a/.llvm.metadata +++ b/.llvm.metadata @@ -1,2 +1,3 @@ -975020d4f7164d84a89f0f9b2153dd870d06e02d SOURCES/llvm-14.0.6.src.tar.xz -b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc +8f06060871953422820098346da9a3b63b90120d SOURCES/cmake-15.0.7.src.tar.xz +497ca3b2010cc0e3e38bc9dc6dda19041dbd7066 SOURCES/llvm-15.0.7.src.tar.xz +347bdd5ee6d6b93c9644c268511815912c0fb2dc SOURCES/release-keys.asc diff --git a/SOURCES/0001-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch b/SOURCES/0001-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch deleted file mode 100644 index 1ddfb0c..0000000 --- a/SOURCES/0001-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3df079ae29426b4bee3ca11681a41958d72b983a Mon Sep 17 00:00:00 2001 -From: Nikita Popov -Date: Mon, 31 Jan 2022 10:33:27 +0100 -Subject: [PATCH] Disable CrashRecoveryTest.DumpStackCleanup test on aarch64 - -Produces a non-reproducible failure on aarch64: -https://bugzilla.redhat.com/show_bug.cgi?id=2048440 ---- - llvm/unittests/Support/CrashRecoveryTest.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/llvm/unittests/Support/CrashRecoveryTest.cpp b/llvm/unittests/Support/CrashRecoveryTest.cpp -index e95513eb2841..afb1d3a1f6a2 100644 ---- a/llvm/unittests/Support/CrashRecoveryTest.cpp -+++ b/llvm/unittests/Support/CrashRecoveryTest.cpp -@@ -76,6 +76,7 @@ TEST(CrashRecoveryTest, Cleanup) { - llvm::CrashRecoveryContext::Disable(); - } - -+#ifndef __aarch64__ - TEST(CrashRecoveryTest, DumpStackCleanup) { - SmallString<128> Filename; - std::error_code EC = sys::fs::createTemporaryFile("crash", "test", Filename); -@@ -101,6 +102,7 @@ TEST(CrashRecoveryTest, DumpStackCleanup) { - EXPECT_EQ(GlobalInt, 1); - llvm::CrashRecoveryContext::Disable(); - } -+#endif - - TEST(CrashRecoveryTest, LimitedStackTrace) { - std::string Res; --- -2.34.1 - - diff --git a/SOURCES/0001-Install-clang-tblgen.patch b/SOURCES/0001-Install-clang-tblgen.patch new file mode 100644 index 0000000..6bfc2e2 --- /dev/null +++ b/SOURCES/0001-Install-clang-tblgen.patch @@ -0,0 +1,28 @@ +From 2e106d4cfc909e23e16104725706e4f9dda15974 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Fri, 5 Aug 2022 08:57:18 +0200 +Subject: [PATCH] Install clang-tblgen + +--- + llvm/cmake/modules/TableGen.cmake | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake +index 4711456776c8..edcc9d0b607d 100644 +--- a/llvm/cmake/modules/TableGen.cmake ++++ b/llvm/cmake/modules/TableGen.cmake +@@ -186,7 +186,10 @@ macro(add_tablegen target project) + endif() + endif() + +- if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR) AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) ++ # (llvm|mlir|clang)-tblgen may also be used outside the respective projects. ++ if ((${project} STREQUAL LLVM OR ${project} STREQUAL MLIR OR ++ ${project} STREQUAL CLANG) AND ++ NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) + set(export_to_llvmexports) + if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR + NOT LLVM_DISTRIBUTION_COMPONENTS) +-- +2.37.1 + diff --git a/SOURCES/0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch b/SOURCES/0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch deleted file mode 100644 index 4c4a9cf..0000000 --- a/SOURCES/0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9320ffeda3915c8f7be744c983a3470a89107bd7 Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 14 Sep 2021 20:21:20 -0700 -Subject: [PATCH] XFAIL missing-abstract-variable.ll test on ppc64le - -It's seems the strategy with this test is to XFAIL it on all -architectures that it fails on. I wonder if we should be passing -it a specific triple? Also, from what I can tell, this tests only -runs when llvm is configured with LLVM_DEFAULT_TARGET_TRIPLE set -to a non-empty value, which is why it may not fail in every build -configuration. - -Differential Revision: https://reviews.llvm.org/D109806 ---- - llvm/test/DebugInfo/Generic/missing-abstract-variable.ll | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll -index bd0de60268b6..cc5d56b0c512 100644 ---- a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll -+++ b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll -@@ -4,7 +4,7 @@ - ; powerpc64 (and on x86_64 at at least -O2). Presumably this is a SelectionDAG - ; issue. - ; FIXME: arm64 is an alias for aarch64 on macs, apparently? --; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv -+; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, ppc64le - - ; Build from the following source with clang -O2. - --- -2.31.1 - diff --git a/SOURCES/0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch b/SOURCES/0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch new file mode 100644 index 0000000..0f4acd3 --- /dev/null +++ b/SOURCES/0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch @@ -0,0 +1,33 @@ +From 01529ba2c76be37e41713cf7f3eca8b61833e320 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 9 Nov 2021 15:05:07 +0100 +Subject: [PATCH] XFAIL missing-abstract-variable.ll test on ppc64le + +It's seems the strategy with this test is to XFAIL it on all +architectures that it fails on. I wonder if we should be passing +it a specific triple? Also, from what I can tell, this tests only +runs when llvm is configured with LLVM_DEFAULT_TARGET_TRIPLE set +to a non-empty value, which is why it may not fail in every build +configuration. + +Differential Revision: https://reviews.llvm.org/D109806 +--- + llvm/test/DebugInfo/Generic/missing-abstract-variable.ll | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll +index 8f8d404..07a8778 100644 +--- a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll ++++ b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll +@@ -4,7 +4,7 @@ + ; powerpc64 (and on x86_64 at at least -O2). Presumably this is a SelectionDAG + ; issue. + ; FIXME: arm64 is an alias for aarch64 on macs, apparently? +-; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, sparc ++; XFAIL: powerpc64, aarch64, arm64, hexagon, riscv, sparc, ppc64le + + ; Build from the following source with clang -O2. + +-- +1.8.3.1 + diff --git a/SOURCES/cmake-15.0.7.src.tar.xz.sig b/SOURCES/cmake-15.0.7.src.tar.xz.sig new file mode 100644 index 0000000..95cf13c Binary files /dev/null and b/SOURCES/cmake-15.0.7.src.tar.xz.sig differ diff --git a/SOURCES/llvm-14.0.6.src.tar.xz.sig b/SOURCES/llvm-14.0.6.src.tar.xz.sig deleted file mode 100644 index 5629b21..0000000 Binary files a/SOURCES/llvm-14.0.6.src.tar.xz.sig and /dev/null differ diff --git a/SOURCES/llvm-15.0.7.src.tar.xz.sig b/SOURCES/llvm-15.0.7.src.tar.xz.sig new file mode 100644 index 0000000..bd05718 Binary files /dev/null and b/SOURCES/llvm-15.0.7.src.tar.xz.sig differ diff --git a/SPECS/llvm.spec b/SPECS/llvm.spec index e9c02a2..4108907 100644 --- a/SPECS/llvm.spec +++ b/SPECS/llvm.spec @@ -2,7 +2,6 @@ # See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros %global toolchain clang - # Components enabled if supported by target architecture: %define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x %ifarch %{gold_arches} @@ -16,20 +15,18 @@ %bcond_without check %if %{with bundle_compat_lib} -%global compat_maj_ver 13 -%global compat_ver %{compat_maj_ver}.0.1 +%global compat_maj_ver 14 +%global compat_ver %{compat_maj_ver}.0.6 %endif %global llvm_libdir %{_libdir}/%{name} %global build_llvm_libdir %{buildroot}%{llvm_libdir} -#global rc_ver 4 -%global maj_ver 14 +#global rc_ver 3 +%global maj_ver 15 %global min_ver 0 -%global patch_ver 6 -%if !%{maj_ver} && 0%{?rc_ver} -%global abi_revision 2 -%endif +%global patch_ver 7 %global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src +%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %if %{with compat_build} %global pkg_name llvm%{maj_ver} @@ -73,6 +70,11 @@ %global llvm_triple %{_host} %endif +# https://fedoraproject.org/wiki/Changes/PythonSafePath#Opting_out +# Don't add -P to Python shebangs +# The executable Python scripts in /usr/share/opt-viewer/ import each other +%undefine _py3_shebang_P + Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} Release: 1%{?dist} @@ -82,21 +84,25 @@ License: NCSA URL: http://llvm.org Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig -Source2: tstellar-gpg-key.asc +Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig +Source4: release-keys.asc %if %{without compat_build} -Source3: run-lit-tests -Source4: lit.fedora.cfg.py +Source5: run-lit-tests +Source6: lit.fedora.cfg.py %endif %if %{with bundle_compat_lib} -Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz +Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz +Source8: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compat_ver}/llvm-%{compat_ver}.src.tar.xz.sig +Source9: tstellar-gpg-key.asc %endif -%if 0%{?abi_revision} -Patch0: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch -%endif -Patch1: 0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch -Patch2: 0001-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch +Patch2: 0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch + +# Needed to export clang-tblgen during the clang build, needed by the flang docs build. +# TODO: Can be dropped for LLVM 16, see https://reviews.llvm.org/D131282. +Patch3: 0001-Install-clang-tblgen.patch # RHEL-specific patches Patch101: 0001-Deactivate-markdown-doc.patch @@ -212,13 +218,35 @@ Summary: LLVM's modified googletest sources %description googletest LLVM's modified googletest sources. +%package toolset +Summary: Package that installs llvm-toolset +Requires: clang = %{version} +Requires: llvm = %{version} + +%ifnarch s390x +Requires: lld = %{version} +%endif + +%description toolset +This is the main package for llvm-toolset. + %endif %prep -%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE2}' +%if %{with bundle_compat_lib} +%{gpgverify} --keyring='%{SOURCE9}' --signature='%{SOURCE8}' --data='%{SOURCE7}' +%endif + +%setup -T -q -b 2 -n %{cmake_srcdir} +# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir}, +# but this is not a CACHED variable, so we can't actually set it externally :( +cd .. +mv %{cmake_srcdir} cmake %if %{with bundle_compat_lib} -%setup -T -q -b 5 -n llvm-%{compat_ver}.src +%setup -T -q -b 7 -n llvm-%{compat_ver}.src %endif %autosetup -n %{llvm_srcdir} -p2 @@ -242,6 +270,9 @@ LLVM's modified googletest sources. %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif +# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. +export ASMFLAGS=$CFLAGS + # force off shared libs as cmake macros turns it on. %cmake -G Ninja \ -DBUILD_SHARED_LIBS:BOOL=OFF \ @@ -304,7 +335,6 @@ LLVM's modified googletest sources. -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \ -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \ - %{?abi_revision:-DLLVM_ABI_REVISION=%{abi_revision}} \ \ -DLLVM_DEFAULT_TARGET_TRIPLE=%{llvm_triple} \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \ @@ -328,7 +358,8 @@ LLVM's modified googletest sources. -DBUILD_SHARED_LIBS:BOOL=OFF \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_ENABLE_RTTI:BOOL=ON \ - -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} + -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ + -DLLVM_INCLUDE_BENCHMARKS=OFF %ninja_build -C ../llvm-compat-libs LLVM @@ -374,9 +405,6 @@ rm -rf test/tools/UpdateTestChecks install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir} %global install_srcdir %{buildroot}%{_datadir}/llvm/src -%global lit_cfg test/%{_arch}.site.cfg.py -%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} @@ -398,7 +426,7 @@ ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so # Add version suffix to binaries for f in %{buildroot}/%{install_bindir}/*; do filename=`basename $f` - ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} done # Move header files @@ -526,7 +554,6 @@ fi %{_libdir}/bfd-plugins/LLVMgold.so %endif %{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so -%{_libdir}/libLLVM-%{maj_ver}.so%{?abi_revision:.%{abi_revision}} %{_libdir}/libLTO.so* %else %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf @@ -598,9 +625,36 @@ fi %{_datadir}/llvm/src/utils %{_libdir}/libLLVMTestingSupport.a +%files toolset +%license LICENSE.TXT + %endif %changelog +* Fri Jan 13 2023 Konrad Kleine - 15.0.7-1 +- Update to LLVM 15.0.7 +- Remove workaround for rbhz#2048440 + +* Mon Dec 05 2022 Konrad Kleine - 15.0.6-2 +- Disabling LTO for now + +* Mon Dec 05 2022 Konrad Kleine - 15.0.6-1 +- Update to 15.0.6 + +* Mon Sep 26 2022 Konrad Kleine - 15.0.1-1 +- Update to 15.0.1 + +* Mon Sep 26 2022 Konrad Kleine - 15.0.0-3 +- Fixup: Produce toolset subpackage RPM + Related: rhbz#2118979 + +* Wed Sep 21 2022 Konrad Kleine - 15.0.0-2 +- Add toolset subpackage + Related: rhbz#2118979 + +* Fri Sep 16 2022 Konrad Kleine - 15.0.0-1 +- Update to 15.0.0 + * Mon Jul 18 2022 Timm Bäder - 14.0.6-1 - Update to 14.0.6