diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-02-13 00:21:59 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-14 13:07:23 +0000 |
commit | e2fa65d1acd4d27c5506602a4ad90318f04966d4 (patch) | |
tree | 4e992dbed3320a0c39f1561862f0dc63d9d5c4e4 /meta/recipes-devtools/binutils/binutils.inc | |
parent | 64e1bf54866a31e531ebb8c82174feee7d5696ac (diff) | |
download | poky-e2fa65d1acd4d27c5506602a4ad90318f04966d4.tar.gz |
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
(From OE-Core rev: 5ee10b10b3316a368cea73df470befd587ef1cd0)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 0fb6cae407..a4b9aa586d 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc | |||
@@ -40,6 +40,7 @@ FILES_${PN}-dev = " \ | |||
40 | 40 | ||
41 | LDGOLD_ALTS ?= "ld.gold dwp" | 41 | LDGOLD_ALTS ?= "ld.gold dwp" |
42 | LDGOLD_ALTS_riscv64 = "" | 42 | LDGOLD_ALTS_riscv64 = "" |
43 | LDGOLD_ALTS_riscv32 = "" | ||
43 | 44 | ||
44 | USE_ALTERNATIVES_FOR = " \ | 45 | USE_ALTERNATIVES_FOR = " \ |
45 | addr2line \ | 46 | addr2line \ |
@@ -83,6 +84,7 @@ LDGOLD_class-native = "" | |||
83 | LDGOLD_class-crosssdk = "" | 84 | LDGOLD_class-crosssdk = "" |
84 | LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" | 85 | LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" |
85 | 86 | ||
87 | |||
86 | # This is necessary due to a bug in the binutils Makefiles | 88 | # This is necessary due to a bug in the binutils Makefiles |
87 | # EXTRA_OEMAKE = "configure-build-libiberty all" | 89 | # EXTRA_OEMAKE = "configure-build-libiberty all" |
88 | 90 | ||
@@ -163,3 +165,8 @@ inherit update-alternatives | |||
163 | ALTERNATIVE_PRIORITY = "100" | 165 | ALTERNATIVE_PRIORITY = "100" |
164 | 166 | ||
165 | ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" | 167 | ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" |
168 | |||
169 | python () { | ||
170 | if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d): | ||
171 | bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES") | ||
172 | } | ||