commit:     af35827c5fdb9e5ae44b0b16c0ff2acd68f5edab
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Tue Jan  9 13:55:57 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 13:02:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af35827c

dev-libs/rocm-opencl-runtime: fix linker error for ld.lld: error: version 
script assignment issue

Upstream bug: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34720
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild  | 10 +++++++++-
 .../rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild    | 10 +++++++++-
 .../rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild    | 10 +++++++++-
 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild  | 10 +++++++++-
 .../rocm-opencl-runtime/rocm-opencl-runtime-5.7.1-r1.ebuild    | 10 +++++++++-
 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.0.0.ebuild  | 10 +++++++++-
 dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild   | 10 +++++++++-
 7 files changed, 63 insertions(+), 7 deletions(-)

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
index 9b54a7395c71..acf6d1e19593 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake edo flag-o-matic prefix
+inherit cmake edo flag-o-matic toolchain-funcs prefix
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
@@ -59,6 +59,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
index 3d3a0eca5d4a..d8fae3a7c08a 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake edo flag-o-matic
+inherit cmake edo flag-o-matic toolchain-funcs
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
@@ -46,6 +46,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild
index 8dd67252e8b4..a5831a2339c3 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake edo flag-o-matic
+inherit cmake edo flag-o-matic toolchain-funcs
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
@@ -53,6 +53,14 @@ if [[ ${PV} == "9999" ]]; then
        fi
 }
 src_prepare() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        cmake_src_prepare
 
        pushd ${CLR_S} || die

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild
index 51b2ebd90ad8..eca90b34b094 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake edo flag-o-matic
+inherit cmake edo flag-o-matic toolchain-funcs
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
@@ -61,6 +61,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.7.1-r1.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.7.1-r1.ebuild
index 00c9aabadb7c..ae568be79b96 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.7.1-r1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.7.1-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 ROCM_SKIP_GLOBALS=1
-inherit cmake edo flag-o-matic rocm
+inherit cmake edo flag-o-matic toolchain-funcs rocm
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/ROCm-Developer-Tools/clr";
@@ -48,6 +48,14 @@ OB           git-r3_checkout
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.0.0.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.0.0.ebuild
index 20c734321744..1f792dd4cc24 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.0.0.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.0.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 ROCM_SKIP_GLOBALS=1
-inherit cmake edo flag-o-matic rocm
+inherit cmake edo flag-o-matic toolchain-funcs rocm
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/ROCm-Developer-Tools/clr";
@@ -48,6 +48,14 @@ OB           git-r3_checkout
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild 
b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild
index 493ab906785e..fab2b10ec262 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake edo flag-o-matic
+inherit cmake edo flag-o-matic toolchain-funcs
 
 DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime";
@@ -59,6 +59,14 @@ src_prepare() {
 }
 
 src_configure() {
+       # Fix ld.lld linker error: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+       # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+       # https://github.com/gentoo/gentoo/pull/28355
+       # mold needs this too but right now tc-ld-is-mold is also not available
+       if tc-ld-is-lld; then
+               append-ldflags -Wl,--undefined-version
+       fi
+
        # Reported upstream: 
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
        append-cflags -fcommon
 

Reply via email to