From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C6CEA15800F for ; Mon, 6 Feb 2023 03:59:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 036EEE07D0; Mon, 6 Feb 2023 03:59:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD22DE07D0 for ; Mon, 6 Feb 2023 03:59:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED3EE340AE2 for ; Mon, 6 Feb 2023 03:59:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A66A21 for ; Mon, 6 Feb 2023 03:59:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1675655929.488879eeea7979b54150b096a326a33c62e5efe2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/hip/files/hip-5.3.3-correct-ldflag.patch dev-util/hip/hip-5.3.3-r2.ebuild dev-util/hip/hip-5.3.3-r3.ebuild X-VCS-Directories: dev-util/hip/files/ dev-util/hip/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 488879eeea7979b54150b096a326a33c62e5efe2 X-VCS-Branch: master Date: Mon, 6 Feb 2023 03:59:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 41961ee9-98a3-42fb-a82d-b40587996f50 X-Archives-Hash: 22d4c20dcf6b48a17c045af847eabecf commit: 488879eeea7979b54150b096a326a33c62e5efe2 Author: Yiyang Wu gmail com> AuthorDate: Mon Feb 6 02:48:10 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Feb 6 03:58:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=488879ee dev-util/hip: add back patch to strip -rpath in hipcc This fixes hipcc adding -rpath in compilation, which causes QA issue for building ROCm libraries, and linking the incorrect BLAS/LAPACK implementation to rocblas-test, which may cause testing performance degrade. Signed-off-by: Yiyang Wu gmail.com> Closes: https://github.com/gentoo/gentoo/pull/29443 Signed-off-by: Sam James gentoo.org> dev-util/hip/files/hip-5.3.3-correct-ldflag.patch | 20 ++++++++++++++++++++ .../hip/{hip-5.3.3-r2.ebuild => hip-5.3.3-r3.ebuild} | 1 + 2 files changed, 21 insertions(+) diff --git a/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch b/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch new file mode 100644 index 000000000000..20d117841c2b --- /dev/null +++ b/dev-util/hip/files/hip-5.3.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,--enable-new-dtags -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"; diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild similarity index 98% rename from dev-util/hip/hip-5.3.3-r2.ebuild rename to dev-util/hip/hip-5.3.3-r3.ebuild index 072b8d319e97..c11b85e3f2ec 100644 --- a/dev-util/hip/hip-5.3.3-r2.ebuild +++ b/dev-util/hip/hip-5.3.3-r3.ebuild @@ -77,6 +77,7 @@ src_prepare() { pushd ${HIP_S} || die eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch" eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch" + eapply "${FILESDIR}/${PN}-5.3.3-correct-ldflag.patch" eapply "${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" eapply "${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.patch" eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch"