diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils.inc | 74 |
1 files changed, 52 insertions, 22 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 6ed40a1486..e176b5cff1 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -9,22 +9,23 @@ object information), and other tools and related libraries." HOMEPAGE = "http://www.gnu.org/software/binutils/" BUGTRACKER = "http://sourceware.org/bugzilla/" SECTION = "devel" -LICENSE = "GPLv3" +LICENSE = "GPL-3.0-only" DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native" -inherit autotools gettext multilib_header texinfo +inherit autotools gettext multilib_header pkgconfig texinfo -FILES_${PN} = " \ +FILES:${PN} = " \ ${bindir}/${TARGET_PREFIX}* \ ${libdir}/lib*.so.* \ + ${libdir}/bfd-plugins/lib*.so \ ${libdir}/lib*-${PV}*.so \ ${prefix}/${TARGET_SYS}/bin/* \ ${bindir}/embedspu" -RPROVIDES_${PN} += "${PN}-symlinks" +RPROVIDES:${PN} += "${PN}-symlinks" -FILES_${PN}-dev = " \ +FILES:${PN}-dev = " \ ${includedir} \ ${libdir}/*.la \ ${libdir}/libbfd.so \ @@ -32,12 +33,34 @@ FILES_${PN}-dev = " \ ${libdir}/libctf-nobfd.so \ ${libdir}/libopcodes.so" +FILES:${PN}-staticdev += "${libdir}/gprofng/*.a" + # Rather than duplicating multiple entries for these, make one # list and reuse it. +GPROFNGS = " \ + gp-archive \ + gp-collect-app \ + gp-display-html \ + gp-display-src \ + gp-display-text \ + gprofng \ +" + +# it disables gprofng for clang and musl in the bb file +GPROFNGS:toolchain-clang = "" +GPROFNGS:libc-musl = "" + +GPROFNG_ALTS ?= "" +GPROFNG_ALTS:x86 = "${GPROFNGS}" +GPROFNG_ALTS:x86-64 = "${GPROFNGS}" +GPROFNG_ALTS:aarch64 = "${GPROFNGS}" + LDGOLD_ALTS ?= "ld.gold dwp" -LDGOLD_ALTS_riscv64 = "" -LDGOLD_ALTS_riscv32 = "" +LDGOLD_ALTS:riscv64 = "" +LDGOLD_ALTS:riscv32 = "" +LDGOLD_ALTS:loongarch64 = "" +LDGOLD_ALTS:libc-glibc:mipsarch = "" USE_ALTERNATIVES_FOR = " \ addr2line \ @@ -46,6 +69,7 @@ USE_ALTERNATIVES_FOR = " \ c++filt \ elfedit \ gprof \ + ${GPROFNG_ALTS} \ ld \ ld.bfd \ ${LDGOLD_ALTS} \ @@ -59,7 +83,7 @@ USE_ALTERNATIVES_FOR = " \ strip \ " -python do_package_prepend() { +python do_package:prepend() { make_alts = d.getVar("USE_ALTERNATIVES_FOR") or "" prefix = d.getVar("TARGET_PREFIX") bindir = d.getVar("bindir") @@ -74,16 +98,23 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ --disable-werror \ --enable-deterministic-archives \ --enable-plugins \ + --enable-new-dtags \ + --disable-gdb \ + --disable-gdbserver \ + --disable-libdecnumber \ + --disable-readline \ + --disable-sim \ ${LDGOLD} \ ${EXTRA_TARGETS} \ ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" EXTRA_TARGETS = "" -EXTRA_TARGETS_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " -EXTRA_TARGETS_class-native = "" +EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " +EXTRA_TARGETS:class-native = "" -LDGOLD_class-native = "" -LDGOLD_class-crosssdk = "" +LDGOLD:class-native = "" +LDGOLD:class-crosssdk = "" +LDGOLD:libc-glibc:mipsarch = "" LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}" @@ -114,13 +145,7 @@ export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}" MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}" do_configure[vardeps] += "MULTIARCH" do_configure () { - (for d in . bfd binutils gas gold gprof ld libctf opcodes; do - cd ${S}/$d - autoconf - rm -rf autom4te.cache - done - cd ${S} - gnu-configize) + (cd ${S} && gnu-configize) oe_runconf # @@ -151,6 +176,11 @@ do_install () { install -m 644 ${S}/include/ansidecl.h ${D}${includedir} install -m 644 ${S}/include/libiberty.h ${D}${includedir} + # insall pic version of libiberty if available + if [ -e ${B}/libiberty/pic/libiberty.a ]; then + install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a + fi + cd ${D}${bindir} # Symlinks for ease of running these on the native target @@ -169,9 +199,9 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}" +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") + 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): + bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES") } |