From 843a71a34f9938669b52981869e7fc6f0f9586fc9199dd200f7fae646d568510 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Sun, 3 Mar 2024 23:47:45 +0000 Subject: [PATCH 1/4] - Use %patch -P N instead of deprecated %patchN. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm17?expand=0&rev=21 --- llvm17.changes | 5 +++++ llvm17.spec | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/llvm17.changes b/llvm17.changes index 82d93c7..6450fec 100644 --- a/llvm17.changes +++ b/llvm17.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Mar 3 22:46:16 UTC 2024 - Aaron Puchert + +- Use %patch -P N instead of deprecated %patchN. + ------------------------------------------------------------------- Thu Jan 11 07:38:12 UTC 2024 - Fabian Vogt diff --git a/llvm17.spec b/llvm17.spec index 582e12b..70bcf86 100644 --- a/llvm17.spec +++ b/llvm17.spec @@ -422,7 +422,7 @@ BuildRequires: python3-base BuildRequires: pkgconfig(libedit) BuildRequires: pkgconfig(zlib) Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives # llvm does not work on s390 ExcludeArch: s390 %if %{with ffi} @@ -512,7 +512,7 @@ Summary: CLANG frontend for LLVM Group: Development/Languages/C and C++ URL: https://clang.llvm.org/ Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Recommends: clang-tools Recommends: gcc Recommends: glibc-devel @@ -716,7 +716,7 @@ Summary: Linker for Clang/LLVM Group: Development/Tools/Building URL: https://lld.llvm.org/ Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives %description -n lld%{_sonum} LLD is a linker from the LLVM project. That is a drop-in replacement for system linkers and runs much faster than them. It also provides features that are useful for toolchain developers. @@ -748,7 +748,7 @@ BuildRequires: pkgconfig(panel) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(zlib) Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Recommends: python3-lldb%{_sonum} %description -n lldb%{_sonum} @@ -826,24 +826,24 @@ This package contains the development files for Polly. %prep %setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -b 50 -b 51 -n llvm-%{_version}.src -%patch0 -p2 -%patch1 -p2 -%patch5 -p1 -%patch13 -p1 -%patch14 -p1 -%patch16 -p2 -%patch17 -p2 -%patch20 -p1 -%patch21 -p1 -%patch24 -p1 -%patch25 -p2 +%patch -P 0 -p2 +%patch -P 1 -p2 +%patch -P 5 -p1 +%patch -P 13 -p1 +%patch -P 14 -p1 +%patch -P 16 -p2 +%patch -P 17 -p2 +%patch -P 20 -p1 +%patch -P 21 -p1 +%patch -P 24 -p1 +%patch -P 25 -p2 pushd clang-%{_version}.src -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch6 -p1 -%patch9 -p2 +%patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 +%patch -P 6 -p1 +%patch -P 9 -p2 # We hardcode openSUSE rm unittests/Driver/DistroTest.cpp @@ -854,15 +854,15 @@ rm test/Driver/nacl-direct.c popd pushd clang-tools-extra-%{_version}.src -%patch10 -p2 +%patch -P 10 -p2 popd pushd openmp-%{_version}.src -%patch18 -p1 +%patch -P 18 -p1 popd pushd lld-%{_version}.src -%patch26 -p1 +%patch -P 26 -p1 # lld got a compile-time dependency on libunwind that we don't want. (https://reviews.llvm.org/D86805) mkdir include/mach-o cp %{SOURCE13} include/mach-o @@ -870,7 +870,7 @@ popd %if %{with lldb} pushd lldb-%{_version}.src -%patch11 -p1 +%patch -P 11 -p1 popd %endif @@ -879,7 +879,7 @@ sed -i '/set(LLVM_COMMON_CMAKE_UTILS/ s/CMAKE_CURRENT_SOURCE_DIR/CMAKE_SOURCE_DI libcxx{,abi}-%{_version}.src/CMakeLists.txt sed -i '\"runtimes/cmake/Modules" s/CMAKE_CURRENT_SOURCE_DIR/CMAKE_SOURCE_DIR/g' libcxx{,abi}-%{_version}.src/CMakeLists.txt pushd libcxx-%{_version}.src -%patch15 -p2 +%patch -P 15 -p2 rm test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp rm test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp From 5f7199f9dfd642be34ce9b935055414ec9b7c1a597a6a58e082d3bf4d7c99071 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Mon, 4 Mar 2024 21:50:51 +0000 Subject: [PATCH 2/4] - Fix PowerPC triples: use powerpc[64[le]] instead of ppc[64[le]]. - Require 8 GB memory for 64-bit architectures to prevent OOM. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm17?expand=0&rev=22 --- _constraints | 2 +- llvm17.changes | 4 +++- llvm17.spec | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/_constraints b/_constraints index eb02688..323953f 100644 --- a/_constraints +++ b/_constraints @@ -5,7 +5,7 @@ 35 - 4096 + 8192 SLOW_CPU diff --git a/llvm17.changes b/llvm17.changes index 6450fec..040c8e1 100644 --- a/llvm17.changes +++ b/llvm17.changes @@ -1,6 +1,8 @@ ------------------------------------------------------------------- -Sun Mar 3 22:46:16 UTC 2024 - Aaron Puchert +Mon Mar 4 21:29:51 UTC 2024 - Aaron Puchert +- Fix PowerPC triples: use powerpc[64[le]] instead of ppc[64[le]]. +- Require 8 GB memory for 64-bit architectures to prevent OOM. - Use %patch -P N instead of deprecated %patchN. ------------------------------------------------------------------- diff --git a/llvm17.spec b/llvm17.spec index 70bcf86..a68f610 100644 --- a/llvm17.spec +++ b/llvm17.spec @@ -71,7 +71,8 @@ # See https://build.opensuse.org/request/show/968066. %define target_cpu armv6kz %else -%define target_cpu %{_target_cpu} +# What RPM spells ppc, GCC spells powerpc. +%define target_cpu %{lua:print((string.gsub(rpm.expand("%{_target_cpu}"), "ppc", "powerpc")))} %endif %ifarch %{arm} From e6076495e9f79d9d70f2f334ef588eb9330e083bcb3843f3faf268fb4b1a6fb8 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Thu, 7 Mar 2024 01:03:49 +0000 Subject: [PATCH 3/4] Accepting request 1155404 from home:mgorse:branches:devel:tools:compiler - Explicitly define PYTHON3_EXECUTABLE, since python 3.11 is being pulled in by cmake in SLE-15-SP6. OBS-URL: https://build.opensuse.org/request/show/1155404 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm17?expand=0&rev=23 --- llvm17.changes | 6 ++++++ llvm17.spec | 2 ++ 2 files changed, 8 insertions(+) diff --git a/llvm17.changes b/llvm17.changes index 040c8e1..041adce 100644 --- a/llvm17.changes +++ b/llvm17.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 6 03:20:24 UTC 2024 - Michael Gorse + +- Explicitly define PYTHON3_EXECUTABLE, since python 3.11 is being + pulled in by cmake in SLE-15-SP6. + ------------------------------------------------------------------- Mon Mar 4 21:29:51 UTC 2024 - Aaron Puchert diff --git a/llvm17.spec b/llvm17.spec index a68f610..1b44df3 100644 --- a/llvm17.spec +++ b/llvm17.spec @@ -967,6 +967,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \ -DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \ @@ -1049,6 +1050,7 @@ export LD_LIBRARY_PATH=%{sourcedir}/build/%{_lib} %cmake \ -DCMAKE_C_COMPILER="%{sourcedir}/stage1/bin/clang" \ -DCMAKE_CXX_COMPILER="%{sourcedir}/stage1/bin/clang++" \ + -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ From b3859f32b9b113ad9053c0feb7c5802923ca7b076854461f511bf8be2fb8a872 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Thu, 7 Mar 2024 01:09:55 +0000 Subject: [PATCH 4/4] - More consistent placement of -DPython3_EXECUTABLE. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm17?expand=0&rev=24 --- llvm17.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm17.spec b/llvm17.spec index 1b44df3..ba65647 100644 --- a/llvm17.spec +++ b/llvm17.spec @@ -967,7 +967,6 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS:BOOL=OFF \ - -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \ -DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \ @@ -975,6 +974,7 @@ avail_mem=$(awk '/MemAvailable/ { print $2 }' /proc/meminfo) -DLLVM_PARALLEL_LINK_JOBS="$max_link_jobs" \ -DENABLE_LINKER_BUILD_ID=ON \ -DLLVM_BINUTILS_INCDIR=%{_includedir} \ + -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DLLVM_BUILD_TOOLS:BOOL=OFF \ -DLLVM_BUILD_UTILS:BOOL=OFF \ -DLLVM_BUILD_EXAMPLES:BOOL=OFF \ @@ -1050,7 +1050,6 @@ export LD_LIBRARY_PATH=%{sourcedir}/build/%{_lib} %cmake \ -DCMAKE_C_COMPILER="%{sourcedir}/stage1/bin/clang" \ -DCMAKE_CXX_COMPILER="%{sourcedir}/stage1/bin/clang++" \ - -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DLLVM_HOST_TRIPLE=%{host_triple} \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ @@ -1073,6 +1072,7 @@ export LD_LIBRARY_PATH=%{sourcedir}/build/%{_lib} -DLLVM_ENABLE_RTTI:BOOL=ON \ -DLLVM_ENABLE_PIC=ON \ -DLLVM_BINUTILS_INCDIR=%{_includedir} \ + -DPython3_EXECUTABLE=%{_bindir}/python3 \ -DLLVM_ENABLE_ZSTD:BOOL=OFF \ -DLLVM_TARGETS_TO_BUILD=%{llvm_targets} \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{llvm_experimental_targets} \