guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 913ff87b70356378bd8f2d7be0bfc25fbdd671b8
Author: David Elsing <[email protected]>
AuthorDate: Tue Feb 3 21:33:21 2026 +0100
gnu: make-llvm-rocm: Do not use --disable-new-dtags by default.
* gnu/packages/patches/clang-rocm-default-new-dtags.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/llvm.scm (make-llvm-rocm)[source]: Add the patch.
Signed-off-by: Ludovic Courtès <[email protected]>
---
gnu/local.mk | 1 +
gnu/packages/llvm.scm | 4 +++-
.../patches/clang-rocm-default-new-dtags.patch | 23 ++++++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index a63317ec53..ccd96a5e2f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1107,6 +1107,7 @@ dist_patch_DATA =
\
%D%/packages/patches/clang-17.0-link-dsymutil-latomic.patch \
%D%/packages/patches/clang-17.0-fix-build-with-gcc-14-on-arm.patch \
%D%/packages/patches/clang-18.0-libc-search-path.patch \
+ %D%/packages/patches/clang-rocm-default-new-dtags.patch \
%D%/packages/patches/clang-runtime-esan-build-fixes.patch \
%D%/packages/patches/clang-runtime-12-remove-crypt-interceptors.patch \
%D%/packages/patches/clang-runtime-13-glibc-2.36-compat.patch \
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 3e87e5df74..3f08d073bb 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1403,7 +1403,9 @@ Library.")
;; is necessary.
(patches
(map search-patch
- (assoc-ref %llvm-patches (package-version llvm-base))))))
+ (cons
+ "clang-rocm-default-new-dtags.patch"
+ (assoc-ref %llvm-patches (package-version llvm-base)))))))
(arguments
(substitute-keyword-arguments (package-arguments llvm-base)
((#:configure-flags flags)
diff --git a/gnu/packages/patches/clang-rocm-default-new-dtags.patch
b/gnu/packages/patches/clang-rocm-default-new-dtags.patch
new file mode 100644
index 0000000000..ce30d2513b
--- /dev/null
+++ b/gnu/packages/patches/clang-rocm-default-new-dtags.patch
@@ -0,0 +1,23 @@
+Revert to the behavior that if no flag is specified, the LLVM default is
+used. Otherwise, the 'validate-runpath phase in Guix fails, as it looks at
+RUNPATH, not RPATH.
+
+The lines removed by this patch were introduced in
+https://github.com/ROCm/llvm-project/commit/eab679eba1ebe61b2cda99b27ad3f122a9caa14b
+
+diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp
b/clang/lib/Driver/ToolChains/CommonArgs.cpp
+index 4ce53b29e326..379b0507180e 100644
+--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -1313,11 +1313,6 @@ void tools::addOpenMPRuntimeSpecificRPath(const
ToolChain &TC,
+ // lib-debug/lib-perf
+ if (LibSuffix != "lib")
+ addRPathCmdArg(Args, CmdArgs, DefaultLibPath.c_str());
+-
+- if (llvm::find_if(CmdArgs, [](StringRef str) {
+- return !str.compare("--enable-new-dtags");
+- }) == CmdArgs.end())
+- CmdArgs.push_back("--disable-new-dtags");
+ }
+ }
+