]> code.ossystems Code Review - openembedded-core.git/commitdiff
binutils: Workaround mips assembler crash on target
authorKhem Raj <raj.khem@gmail.com>
Mon, 27 May 2019 07:45:26 +0000 (00:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 May 2019 16:06:28 +0000 (17:06 +0100)
assembler ends up crashing on target sometimes due to
segfaults in libbfd, therefore avoid using -O2 for now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/binutils/binutils_2.32.bb

index 51a9748906ab7de519aaed5228f572b95d182262..89315915c478aabea33361ac1ec5de2e80db6d37 100644 (file)
@@ -20,6 +20,11 @@ EXTRA_OECONF_class-native = "--enable-targets=all \
                              --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
 
@@ -47,3 +52,4 @@ PACKAGE_BEFORE_PN += "libbfd"
 FILES_libbfd = "${libdir}/libbfd-*.so"
 
 BBCLASSEXTEND = "native nativesdk"
+