From 7228e7507f59b8f0982c3a68cc5ba8ea35ce1a76 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 2 Mar 2023 19:31:55 +0000 Subject: gentoo auto-resync : 02:03:2023 - 19:31:55 --- dev-util/hip/files/hip-5.4.3-correct-ldflag.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dev-util/hip/files/hip-5.4.3-correct-ldflag.patch (limited to 'dev-util/hip/files/hip-5.4.3-correct-ldflag.patch') diff --git a/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch b/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch new file mode 100644 index 000000000000..3dbbb6721f3b --- /dev/null +++ b/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch @@ -0,0 +1,20 @@ +This removes ldflag -L"/usr/lib" and -Wl,-rpath=/usr/lib:/usr/lib which +causes `ld: skipping incompatible /usr/lib/libm.so when searching for -lm` +Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820 +=================================================================== +Index: HIP-rocm-5.3.3/bin/hipcc.pl +=================================================================== +--- HIP-rocm-5.3.3.orig/bin/hipcc.pl ++++ HIP-rocm-5.3.3/bin/hipcc.pl +@@ -711,9 +711,9 @@ if ($HIP_PLATFORM eq "amd") { + + if (not $isWindows and not $compileOnly) { + if ($linkType eq 0) { +- $toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib -lhsa-runtime64 -ldl -lnuma " . ${toolArgs}; ++ $toolArgs = " -lamdhip64 -lhsa-runtime64 -ldl -lnuma " . ${toolArgs}; + } else { +- $toolArgs = ${toolArgs} . " -Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 "; ++ $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags -lamdhip64 "; + } + # To support __fp16 and _Float16, explicitly link with compiler-rt + $HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a"; -- cgit v1.2.3