commit:     21d7ce6b425ba815dda6adb86ac7779972d5d12c
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 07:27:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 19:14:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21d7ce6b

sys-devel/binutils: fix build with lld-16

Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils/binutils-2.32-r2.ebuild    | 9 ++++++++-
 sys-devel/binutils/binutils-2.33.1-r1.ebuild  | 9 ++++++++-
 sys-devel/binutils/binutils-2.34-r2.ebuild    | 9 ++++++++-
 sys-devel/binutils/binutils-2.35.2.ebuild     | 9 ++++++++-
 sys-devel/binutils/binutils-2.36.1-r2.ebuild  | 9 ++++++++-
 sys-devel/binutils/binutils-2.37_p1-r2.ebuild | 9 ++++++++-
 sys-devel/binutils/binutils-2.38-r2.ebuild    | 9 ++++++++-
 sys-devel/binutils/binutils-2.39-r4.ebuild    | 9 ++++++++-
 sys-devel/binutils/binutils-9999.ebuild       | 9 ++++++++-
 9 files changed, 72 insertions(+), 9 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild 
b/sys-devel/binutils/binutils-2.32-r2.ebuild
index d19fc5bc163c..df54d7b7423d 100644
--- a/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -162,6 +162,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index 2fd7c51dacb2..04c74a25e107 100644
--- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -155,6 +155,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild 
b/sys-devel/binutils/binutils-2.34-r2.ebuild
index f135644d0304..941890975f99 100644
--- a/sys-devel/binutils/binutils-2.34-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -152,6 +152,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild 
b/sys-devel/binutils/binutils-2.35.2.ebuild
index 88e1395e6322..3e9e6183b4cd 100644
--- a/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -169,6 +169,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-2.36.1-r2.ebuild 
b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
index 2231530b7f36..dcaa4a446b58 100644
--- a/sys-devel/binutils/binutils-2.36.1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.36.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -164,6 +164,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        local x
        echo
        for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild 
b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
index 712f1d46b7a1..333ff355ede5 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -170,6 +170,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
        local x

diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild 
b/sys-devel/binutils/binutils-2.38-r2.ebuild
index 401310d2e924..bea67260a9ec 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -175,6 +175,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
        local x

diff --git a/sys-devel/binutils/binutils-2.39-r4.ebuild 
b/sys-devel/binutils/binutils-2.39-r4.ebuild
index f0baee70d145..3adccc27a417 100644
--- a/sys-devel/binutils/binutils-2.39-r4.ebuild
+++ b/sys-devel/binutils/binutils-2.39-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -171,6 +171,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
        local x

diff --git a/sys-devel/binutils/binutils-9999.ebuild 
b/sys-devel/binutils/binutils-9999.ebuild
index 9f4fe6d456ab..1f81a5189b72 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -171,6 +171,13 @@ src_configure() {
        # Keep things sane
        strip-flags
 
+       # 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
+
        use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
 
        local x

Reply via email to