1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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 <ludo@gnu.org>
This commit is contained in:
David Elsing
2026-02-03 21:33:21 +01:00
committed by Ludovic Courtès
parent 7d09e6f881
commit 913ff87b70
3 changed files with 27 additions and 1 deletions

View File

@@ -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 \

View File

@@ -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)

View File

@@ -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");
}
}