public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/llvm] rawhide: Use COMPILER_RT_DEFAULT_TARGET_ONLY=ON
@ 2026-12-02 8:13 Nikita Popov
0 siblings, 0 replies; only message in thread
From: Nikita Popov @ 2026-12-02 8:13 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/llvm
Branch : rawhide
Commit : ce5619a5435196a46ea969226e5fcc9a82c80c45
Author : Nikita Popov <npopov@redhat.com>
Date : 2026-12-02T08:13:27+00:00
Stats : +35/-38 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/llvm/c/ce5619a5435196a46ea969226e5fcc9a82c80c45?branch=rawhide
Log:
Use COMPILER_RT_DEFAULT_TARGET_ONLY=ON
This switches us to COMPILER_RT_DEFAULT_TARGET_ONLY=ON, which
makes compiler-rt use exactly the triple we specify, avoid the
need to move it after the fact. This is a prerequisite for
enabling compiler-rt tests, because the after-the-fact move
does not work for that. It also fixes a number of libomp tests
on ppc64le.
This requires backporting one patch to make compiler-rt
recognize ppc64le instead of powerpc64le as a powerpc triple.
---
diff --git a/0001-compiler-rt-Map-ppc64le-powerpc64le.patch b/0001-compiler-rt-Map-ppc64le-powerpc64le.patch
new file mode 100644
index 0000000..b2030c5
--- /dev/null
+++ b/0001-compiler-rt-Map-ppc64le-powerpc64le.patch
@@ -0,0 +1,28 @@
+From 68b04842c2f9a5c223d5eccc79b657c56a1cf5d7 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <npopov@redhat.com>
+Date: Fri, 20 Nov 2026 13:20:47 +0100
+Subject: [PATCH] [compiler-rt] Map ppc64le -> powerpc64le
+
+---
+ compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index c8ccf845992e..f44a34fa840d 100644
+--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
++++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+@@ -428,6 +428,11 @@ macro(construct_compiler_rt_default_triple)
+ set(COMPILER_RT_DEFAULT_TARGET_ARCH "i386")
+ endif()
+
++ # Map alternative PowerPC spellings (ppc64le etc.) to the canonical names.
++ if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "^ppc")
++ string(REGEX REPLACE "^ppc" "powerpc" COMPILER_RT_DEFAULT_TARGET_ARCH "${COMPILER_RT_DEFAULT_TARGET_ARCH}")
++ endif()
++
+ if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "^thumb")
+ string(REPLACE "thumb" "arm" COMPILER_RT_DEFAULT_TARGET_ARCH "${COMPILER_RT_DEFAULT_TARGET_ARCH}")
+ set(COMPILER_RT_ARM_THUMB ON)
+--
+2.56.1
+
diff --git a/llvm.spec b/llvm.spec
index bdbe847..575ef77 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -644,6 +644,9 @@ Patch2308: 80ef20addc82619c07b6deaec5f9995000b5dd16.patch
Patch2309: 0001-PowerPC-Fix-stack-protector-indirect-tail-call-on-po.patch
Patch2403: 0001-PowerPC-Fix-stack-protector-indirect-tail-call-on-po.patch
+# Backport of https://github.com/llvm/llvm-project/pull/247127.
+Patch2310: 0001-compiler-rt-Map-ppc64le-powerpc64le.patch
+
%if 0%{?rhel} == 8
%global python3_pkgversion 3.12
%global __python3 /usr/bin/python3.12
@@ -1798,6 +1801,7 @@ popd
%global cmake_config_args %{cmake_config_args} \\\
-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF \\\
-DCOMPILER_RT_INSTALL_PATH=%{_prefix}/lib/clang/%{maj_ver} \\\
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \\\
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON
#endregion compiler-rt options
@@ -2439,18 +2443,14 @@ echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/i386
# also a symlink llvm_triple -> compiler_rt_triple.
%global compiler_rt_triple %{llvm_triple}
-%ifarch ppc64le
-# Fix install path on ppc64le so that the directory name matches the triple used
-# by clang.
-mkdir -pv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
-mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu/* %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
-%endif
-
%ifarch %{ix86}
# Fix install path on ix86 so that the directory name matches the triple used
# by clang on both actual ix86 (i686) and on x86_64 with -m32 (i386):
%global compiler_rt_triple i386-redhat-linux-gnu
%if "%{llvm_triple}" != "%{compiler_rt_triple}"
+# This move is just to preserve existing layout, we could drop it for LLVM 24 and invert the
+# symlink direction instead.
+mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/{%{llvm_triple},%{compiler_rt_triple}}
ln -s %{compiler_rt_triple} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
%endif
%endif
@@ -2928,37 +2928,6 @@ export LIT_XFAIL="$LIT_XFAIL;api/ompx_3d.cpp"
%endif
%ifarch ppc64le
-export LIT_XFAIL="$LIT_XFAIL;barrier/barrier.c"
-export LIT_XFAIL="$LIT_XFAIL;critical/critical.c"
-export LIT_XFAIL="$LIT_XFAIL;critical/lock-nested.c"
-export LIT_XFAIL="$LIT_XFAIL;critical/lock.c"
-export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-firstprivate.c"
-export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-nosuppression.c"
-export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple.c"
-export LIT_XFAIL="$LIT_XFAIL;parallel/parallel-simple2.c"
-export LIT_XFAIL="$LIT_XFAIL;races/critical-unrelated.c"
-export LIT_XFAIL="$LIT_XFAIL;races/lock-nested-unrelated.c"
-export LIT_XFAIL="$LIT_XFAIL;races/lock-unrelated.c"
-export LIT_XFAIL="$LIT_XFAIL;races/parallel-simple.c"
-export LIT_XFAIL="$LIT_XFAIL;races/task-dependency.c"
-export LIT_XFAIL="$LIT_XFAIL;races/task-taskgroup-unrelated.c"
-export LIT_XFAIL="$LIT_XFAIL;races/task-two.c"
-export LIT_XFAIL="$LIT_XFAIL;races/taskwait-depend.c"
-export LIT_XFAIL="$LIT_XFAIL;races/task-taskwait-nested.c"
-export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction-nowait.c"
-export LIT_XFAIL="$LIT_XFAIL;reduction/parallel-reduction.c"
-export LIT_XFAIL="$LIT_XFAIL;task/omp_task_depend_all.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-barrier.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-create.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-dependency.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup-nested.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-taskgroup.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait-nested.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task-taskwait.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task_early_fulfill.c"
-export LIT_XFAIL="$LIT_XFAIL;task/task_late_fulfill.c"
-export LIT_XFAIL="$LIT_XFAIL;task/taskwait-depend.c"
-export LIT_XFAIL="$LIT_XFAIL;worksharing/ordered.c"
export LIT_XFAIL="$LIT_XFAIL;api/omp_dynamic_shared_memory.c"
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl1.c"
export LIT_XFAIL="$LIT_XFAIL;jit/empty_kernel_lvl2.c"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 8:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 8:13 [rpms/llvm] rawhide: Use COMPILER_RT_DEFAULT_TARGET_ONLY=ON Nikita Popov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox