[oe-commits] [openembedded-core] 03/25: binutils: Bail out if gold is used on 32/64 bit RISC-V

git at git.openembedded.org git at git.openembedded.org
Thu Feb 13 15:12:13 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 8d6056006c1e1abf8029b13879a9587f92e2277d
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu Feb 13 00:21:59 2020 -0800

    binutils: Bail out if gold is used on 32/64 bit RISC-V
    
    gold is not supporting risc-v yet and, this will cause subltle errors
    during build e.g. autoconf not finding certain features like visibility
    and it could take a while to unwind the problem. Its better to error out
    early
    
    Remove dwp and ld.gold for rv32 as well
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/binutils/binutils.inc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 0fb6cae..a4b9aa5 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -40,6 +40,7 @@ FILES_${PN}-dev = " \
 
 LDGOLD_ALTS ?= "ld.gold dwp"
 LDGOLD_ALTS_riscv64 = ""
+LDGOLD_ALTS_riscv32 = ""
 
 USE_ALTERNATIVES_FOR = " \
 	addr2line \
@@ -83,6 +84,7 @@ LDGOLD_class-native = ""
 LDGOLD_class-crosssdk = ""
 LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
 
+
 # This is necessary due to a bug in the binutils Makefiles
 # EXTRA_OEMAKE = "configure-build-libiberty all"
 
@@ -163,3 +165,8 @@ inherit update-alternatives
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}"
+
+python () {
+    if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d):
+        bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES")
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list