diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils.inc | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 81891963c8..e176b5cff1 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc | |||
@@ -9,13 +9,13 @@ object information), and other tools and related libraries." | |||
9 | HOMEPAGE = "http://www.gnu.org/software/binutils/" | 9 | HOMEPAGE = "http://www.gnu.org/software/binutils/" |
10 | BUGTRACKER = "http://sourceware.org/bugzilla/" | 10 | BUGTRACKER = "http://sourceware.org/bugzilla/" |
11 | SECTION = "devel" | 11 | SECTION = "devel" |
12 | LICENSE = "GPLv3" | 12 | LICENSE = "GPL-3.0-only" |
13 | 13 | ||
14 | DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native" | 14 | DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native" |
15 | 15 | ||
16 | inherit autotools gettext multilib_header texinfo | 16 | inherit autotools gettext multilib_header pkgconfig texinfo |
17 | 17 | ||
18 | FILES_${PN} = " \ | 18 | FILES:${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*.so \ |
@@ -23,9 +23,9 @@ FILES_${PN} = " \ | |||
23 | ${prefix}/${TARGET_SYS}/bin/* \ | 23 | ${prefix}/${TARGET_SYS}/bin/* \ |
24 | ${bindir}/embedspu" | 24 | ${bindir}/embedspu" |
25 | 25 | ||
26 | RPROVIDES_${PN} += "${PN}-symlinks" | 26 | RPROVIDES:${PN} += "${PN}-symlinks" |
27 | 27 | ||
28 | FILES_${PN}-dev = " \ | 28 | FILES:${PN}-dev = " \ |
29 | ${includedir} \ | 29 | ${includedir} \ |
30 | ${libdir}/*.la \ | 30 | ${libdir}/*.la \ |
31 | ${libdir}/libbfd.so \ | 31 | ${libdir}/libbfd.so \ |
@@ -33,13 +33,34 @@ FILES_${PN}-dev = " \ | |||
33 | ${libdir}/libctf-nobfd.so \ | 33 | ${libdir}/libctf-nobfd.so \ |
34 | ${libdir}/libopcodes.so" | 34 | ${libdir}/libopcodes.so" |
35 | 35 | ||
36 | FILES:${PN}-staticdev += "${libdir}/gprofng/*.a" | ||
37 | |||
36 | # Rather than duplicating multiple entries for these, make one | 38 | # Rather than duplicating multiple entries for these, make one |
37 | # list and reuse it. | 39 | # list and reuse it. |
38 | 40 | ||
41 | GPROFNGS = " \ | ||
42 | gp-archive \ | ||
43 | gp-collect-app \ | ||
44 | gp-display-html \ | ||
45 | gp-display-src \ | ||
46 | gp-display-text \ | ||
47 | gprofng \ | ||
48 | " | ||
49 | |||
50 | # it disables gprofng for clang and musl in the bb file | ||
51 | GPROFNGS:toolchain-clang = "" | ||
52 | GPROFNGS:libc-musl = "" | ||
53 | |||
54 | GPROFNG_ALTS ?= "" | ||
55 | GPROFNG_ALTS:x86 = "${GPROFNGS}" | ||
56 | GPROFNG_ALTS:x86-64 = "${GPROFNGS}" | ||
57 | GPROFNG_ALTS:aarch64 = "${GPROFNGS}" | ||
58 | |||
39 | LDGOLD_ALTS ?= "ld.gold dwp" | 59 | LDGOLD_ALTS ?= "ld.gold dwp" |
40 | LDGOLD_ALTS_riscv64 = "" | 60 | LDGOLD_ALTS:riscv64 = "" |
41 | LDGOLD_ALTS_riscv32 = "" | 61 | LDGOLD_ALTS:riscv32 = "" |
42 | LDGOLD_ALTS_libc-glibc_mipsarch = "" | 62 | LDGOLD_ALTS:loongarch64 = "" |
63 | LDGOLD_ALTS:libc-glibc:mipsarch = "" | ||
43 | 64 | ||
44 | USE_ALTERNATIVES_FOR = " \ | 65 | USE_ALTERNATIVES_FOR = " \ |
45 | addr2line \ | 66 | addr2line \ |
@@ -48,6 +69,7 @@ USE_ALTERNATIVES_FOR = " \ | |||
48 | c++filt \ | 69 | c++filt \ |
49 | elfedit \ | 70 | elfedit \ |
50 | gprof \ | 71 | gprof \ |
72 | ${GPROFNG_ALTS} \ | ||
51 | ld \ | 73 | ld \ |
52 | ld.bfd \ | 74 | ld.bfd \ |
53 | ${LDGOLD_ALTS} \ | 75 | ${LDGOLD_ALTS} \ |
@@ -61,7 +83,7 @@ USE_ALTERNATIVES_FOR = " \ | |||
61 | strip \ | 83 | strip \ |
62 | " | 84 | " |
63 | 85 | ||
64 | python do_package_prepend() { | 86 | python do_package:prepend() { |
65 | make_alts = d.getVar("USE_ALTERNATIVES_FOR") or "" | 87 | make_alts = d.getVar("USE_ALTERNATIVES_FOR") or "" |
66 | prefix = d.getVar("TARGET_PREFIX") | 88 | prefix = d.getVar("TARGET_PREFIX") |
67 | bindir = d.getVar("bindir") | 89 | bindir = d.getVar("bindir") |
@@ -76,6 +98,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ | |||
76 | --disable-werror \ | 98 | --disable-werror \ |
77 | --enable-deterministic-archives \ | 99 | --enable-deterministic-archives \ |
78 | --enable-plugins \ | 100 | --enable-plugins \ |
101 | --enable-new-dtags \ | ||
79 | --disable-gdb \ | 102 | --disable-gdb \ |
80 | --disable-gdbserver \ | 103 | --disable-gdbserver \ |
81 | --disable-libdecnumber \ | 104 | --disable-libdecnumber \ |
@@ -86,12 +109,12 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ | |||
86 | ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" | 109 | ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" |
87 | 110 | ||
88 | EXTRA_TARGETS = "" | 111 | EXTRA_TARGETS = "" |
89 | EXTRA_TARGETS_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " | 112 | EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " |
90 | EXTRA_TARGETS_class-native = "" | 113 | EXTRA_TARGETS:class-native = "" |
91 | 114 | ||
92 | LDGOLD_class-native = "" | 115 | LDGOLD:class-native = "" |
93 | LDGOLD_class-crosssdk = "" | 116 | LDGOLD:class-crosssdk = "" |
94 | LDGOLD_libc-glibc_mipsarch = "" | 117 | LDGOLD:libc-glibc:mipsarch = "" |
95 | LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" | 118 | LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" |
96 | 119 | ||
97 | 120 | ||
@@ -170,17 +193,15 @@ do_install () { | |||
170 | done | 193 | done |
171 | 194 | ||
172 | oe_multilib_header bfd.h | 195 | oe_multilib_header bfd.h |
173 | # bfd_stdint.h encodes the compiler name in the header | ||
174 | sed -i ${D}${includedir}/bfd_stdint.h -e "s,${TARGET_PREFIX},," | ||
175 | } | 196 | } |
176 | 197 | ||
177 | inherit update-alternatives | 198 | inherit update-alternatives |
178 | 199 | ||
179 | ALTERNATIVE_PRIORITY = "100" | 200 | ALTERNATIVE_PRIORITY = "100" |
180 | 201 | ||
181 | ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" | 202 | ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}" |
182 | 203 | ||
183 | python () { | 204 | python () { |
184 | if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d): | 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): |
185 | bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES") | 206 | bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES") |
186 | } | 207 | } |