From 82f7d5cfc2ab02f39b69c0f8697d660936422d4a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 20 Feb 2020 09:13:40 -0800 Subject: binutils: Upgrade to 2.34 release Details of changelog [1] Removing bfd/ld patch to enable PE targets, instead use specific emulations via --enable-targets for x86_64 Re-arrange/forward-port patches and upgrade libctf configure to libtool 2.4 patch rpaths are no longer emitted into elfedit/readelf therefore no need of chrpath anymore Instead of pre-generating configure scripts and house them in libtool patch, generate them during configure. This also ensures that we do not patch configure directly but rather the sources which generate it Package newly added libctf library [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00000.html Signed-off-by: Khem Raj Cc: Christopher Clark Signed-off-by: Richard Purdie --- meta/recipes-devtools/binutils/binutils_2.34.bb | 60 +++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils_2.34.bb (limited to 'meta/recipes-devtools/binutils/binutils_2.34.bb') diff --git a/meta/recipes-devtools/binutils/binutils_2.34.bb b/meta/recipes-devtools/binutils/binutils_2.34.bb new file mode 100644 index 0000000000..bfc9346822 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils_2.34.bb @@ -0,0 +1,60 @@ +require binutils.inc +require binutils-${PV}.inc + +DEPENDS += "flex bison zlib" + +EXTRA_OECONF += "--with-sysroot=/ \ + --enable-install-libbfd \ + --enable-install-libiberty \ + --enable-shared \ + --with-system-zlib \ + " + +EXTRA_OEMAKE_append_libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + " +EXTRA_OECONF_class-native = "--enable-targets=all \ + --enable-64-bit-bfd \ + --enable-install-libiberty \ + --enable-install-libbfd \ + --disable-werror" + +# gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target +# So remove -O2 and use -Os as workaround +SELECTED_OPTIMIZATION_remove_mipsarch = "-O2" +SELECTED_OPTIMIZATION_append_mipsarch = " -Os" + +do_install_class-native () { + autotools_do_install + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + # We only want libiberty, libbfd and libopcodes + rm -rf ${D}${bindir} + rm -rf ${D}${prefix}/${TARGET_SYS} + rm -rf ${D}${prefix}/lib/ldscripts + rm -rf ${D}${prefix}/share/info + rm -rf ${D}${prefix}/share/locale + rm -rf ${D}${prefix}/share/man + rmdir ${D}${prefix}/share || : + rmdir ${D}/${libdir}/gcc-lib || : + rmdir ${D}/${libdir}64/gcc-lib || : + rmdir ${D}/${libdir} || : + rmdir ${D}/${libdir}64 || : +} + +# Split out libbfd-*.so so including perf doesn't include extra stuff +PACKAGE_BEFORE_PN += "libbfd" +FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so" + +SRC_URI_append_class-nativesdk = " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch " + +USE_ALTERNATIVES_FOR_class-nativesdk = "" +FILES_${PN}_append_class-nativesdk = " ${bindir}" + +BBCLASSEXTEND = "native nativesdk" + -- cgit 1.2.3-korg