summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc36
1 files changed, 11 insertions, 25 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index e176b5cff1..00b1301258 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -18,7 +18,7 @@ inherit autotools gettext multilib_header pkgconfig texinfo
18FILES:${PN} = " \ 18FILES:${PN} = " \
19 ${bindir}/${TARGET_PREFIX}* \ 19 ${bindir}/${TARGET_PREFIX}* \
20 ${libdir}/lib*.so.* \ 20 ${libdir}/lib*.so.* \
21 ${libdir}/bfd-plugins/lib*.so \ 21 ${libdir}/bfd-plugins/lib*${SOLIBSDEV} \
22 ${libdir}/lib*-${PV}*.so \ 22 ${libdir}/lib*-${PV}*.so \
23 ${prefix}/${TARGET_SYS}/bin/* \ 23 ${prefix}/${TARGET_SYS}/bin/* \
24 ${bindir}/embedspu" 24 ${bindir}/embedspu"
@@ -39,11 +39,11 @@ FILES:${PN}-staticdev += "${libdir}/gprofng/*.a"
39# list and reuse it. 39# list and reuse it.
40 40
41GPROFNGS = " \ 41GPROFNGS = " \
42 gp-archive \ 42 gprofng-archive \
43 gp-collect-app \ 43 gprofng-collect-app \
44 gp-display-html \ 44 gprofng-display-html \
45 gp-display-src \ 45 gprofng-display-src \
46 gp-display-text \ 46 gprofng-display-text \
47 gprofng \ 47 gprofng \
48" 48"
49 49
@@ -56,12 +56,6 @@ GPROFNG_ALTS:x86 = "${GPROFNGS}"
56GPROFNG_ALTS:x86-64 = "${GPROFNGS}" 56GPROFNG_ALTS:x86-64 = "${GPROFNGS}"
57GPROFNG_ALTS:aarch64 = "${GPROFNGS}" 57GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
58 58
59LDGOLD_ALTS ?= "ld.gold dwp"
60LDGOLD_ALTS:riscv64 = ""
61LDGOLD_ALTS:riscv32 = ""
62LDGOLD_ALTS:loongarch64 = ""
63LDGOLD_ALTS:libc-glibc:mipsarch = ""
64
65USE_ALTERNATIVES_FOR = " \ 59USE_ALTERNATIVES_FOR = " \
66 addr2line \ 60 addr2line \
67 ar \ 61 ar \
@@ -72,7 +66,6 @@ USE_ALTERNATIVES_FOR = " \
72 ${GPROFNG_ALTS} \ 66 ${GPROFNG_ALTS} \
73 ld \ 67 ld \
74 ld.bfd \ 68 ld.bfd \
75 ${LDGOLD_ALTS} \
76 nm \ 69 nm \
77 objcopy \ 70 objcopy \
78 objdump \ 71 objdump \
@@ -104,7 +97,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
104 --disable-libdecnumber \ 97 --disable-libdecnumber \
105 --disable-readline \ 98 --disable-readline \
106 --disable-sim \ 99 --disable-sim \
107 ${LDGOLD} \ 100 --disable-gold \
108 ${EXTRA_TARGETS} \ 101 ${EXTRA_TARGETS} \
109 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" 102 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
110 103
@@ -112,12 +105,6 @@ EXTRA_TARGETS = ""
112EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " 105EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
113EXTRA_TARGETS:class-native = "" 106EXTRA_TARGETS:class-native = ""
114 107
115LDGOLD:class-native = ""
116LDGOLD:class-crosssdk = ""
117LDGOLD:libc-glibc:mipsarch = ""
118LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
119
120
121# This is necessary due to a bug in the binutils Makefiles 108# This is necessary due to a bug in the binutils Makefiles
122# EXTRA_OEMAKE = "configure-build-libiberty all" 109# EXTRA_OEMAKE = "configure-build-libiberty all"
123 110
@@ -191,6 +178,10 @@ do_install () {
191 for alt in ${USE_ALTERNATIVES_FOR}; do 178 for alt in ${USE_ALTERNATIVES_FOR}; do
192 rm -f ${D}${bindir}/$alt 179 rm -f ${D}${bindir}/$alt
193 done 180 done
181 # remove old pre 2.44 release gprofng binary names
182 for f in gp-archive gp-collect-app gp-display-html gp-display-src gp-display-text; do
183 rm -f ${D}${bindir}/$f
184 done
194 185
195 oe_multilib_header bfd.h 186 oe_multilib_header bfd.h
196} 187}
@@ -200,8 +191,3 @@ inherit update-alternatives
200ALTERNATIVE_PRIORITY = "100" 191ALTERNATIVE_PRIORITY = "100"
201 192
202ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}" 193ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}"
203
204python () {
205 if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64 loongarch64', True, False, d):
206 bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES")
207}