diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils.inc | 63 |
1 files changed, 41 insertions, 22 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 0fb6cae407..789c8bec21 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc @@ -9,37 +9,37 @@ 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" -# -# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath -# -DEPENDS_append_class-target = " chrpath-replacement-native" -EXTRANATIVEPATH_append_class-target = " chrpath-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}/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 \ + ${libdir}/libctf.so \ + ${libdir}/libctf-nobfd.so \ ${libdir}/libopcodes.so" # Rather than duplicating multiple entries for these, make one # list and reuse it. LDGOLD_ALTS ?= "ld.gold dwp" -LDGOLD_ALTS_riscv64 = "" +LDGOLD_ALTS:riscv64 = "" +LDGOLD_ALTS:riscv32 = "" +LDGOLD_ALTS:libc-glibc:mipsarch = "" USE_ALTERNATIVES_FOR = " \ addr2line \ @@ -61,7 +61,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") @@ -76,13 +76,25 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ --disable-werror \ --enable-deterministic-archives \ --enable-plugins \ + --disable-gdb \ + --disable-gdbserver \ + --disable-libdecnumber \ + --disable-readline \ + --disable-sim \ ${LDGOLD} \ + ${EXTRA_TARGETS} \ ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}" -LDGOLD_class-native = "" -LDGOLD_class-crosssdk = "" +EXTRA_TARGETS = "" +EXTRA_TARGETS:x86-64 = " --enable-targets=x86_64-pe,x86_64-pep " +EXTRA_TARGETS:class-native = "" + +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)}" + # This is necessary due to a bug in the binutils Makefiles # EXTRA_OEMAKE = "configure-build-libiberty all" @@ -110,7 +122,8 @@ 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 () { - (cd ${S}; gnu-configize) || die "Failed to run gnu-configize" + (cd ${S} && gnu-configize) + oe_runconf # # must prime config.cache to ensure the build of libiberty @@ -121,10 +134,6 @@ do_configure () { done } -do_compile_append_class-target() { - chrpath -d ${B}/binutils/elfedit - chrpath -d ${B}/binutils/readelf -} do_install () { autotools_do_install @@ -144,6 +153,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 @@ -162,4 +176,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") +} |