commit: b79a363ec62995eb6f93d7421561b283694b77af
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Wed Jan 10 21:07:43 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 8 19:22:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b79a363e
sci-libs/rocFFT: fix build with ld.lld
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch | 14 ++++++++++++++
sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild | 4 +++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch
b/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch
new file mode 100644
index 000000000000..03731516d8fb
--- /dev/null
+++ b/sci-libs/rocFFT/files/rocFFT-5.7.1-fix-rocm-link-path.patch
@@ -0,0 +1,14 @@
+ld.lld with "-L/usr/lib -lhiprtc -ldl" fails in attempt to link
+64-bit library to 32-bit /usr/lib/libdl.so.2 with:
+"ld.lld: error: <...>/Scrt1.o is incompatible with elf32-i386"
+--- a/library/src/CMakeLists.txt
++++ b/library/src/CMakeLists.txt
+@@ -46,7 +46,7 @@ else()
+ if( WIN32 )
+ set( ROCFFT_RTC_LINK_LIBS "${HIP_PATH}/lib/hiprtc.lib" )
+ else()
+- set( ROCFFT_RTC_LINK_LIBS -L${ROCM_PATH}/lib -lhiprtc -ldl )
++ set( ROCFFT_RTC_LINK_LIBS -lhiprtc -ldl )
+ endif()
+ endif()
+
diff --git a/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
index 5da8c917f384..4a924bd502a7 100644
--- a/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
+++ b/sci-libs/rocFFT/rocFFT-5.7.1-r1.ebuild
@@ -54,7 +54,9 @@ RESTRICT="!test? ( test )"
S="${WORKDIR}/rocFFT-rocm-${PV}"
-PATCHES=()
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.7.1-fix-rocm-link-path.patch
+)
required_mem() {
if use test; then