diff mbox series

binutils: Workaround mips assembler crash on target

Message ID 20190527074526.27553-1-raj.khem@gmail.com
State Accepted
Commit a6f9327e79df1bfadb1f613eda799586e60009f2
Headers show
Series binutils: Workaround mips assembler crash on target | expand

Commit Message

Khem Raj May 27, 2019, 7:45 a.m. UTC
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>

---
 meta/recipes-devtools/binutils/binutils_2.32.bb | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.21.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/binutils/binutils_2.32.bb b/meta/recipes-devtools/binutils/binutils_2.32.bb
index 51a9748906..89315915c4 100644
--- a/meta/recipes-devtools/binutils/binutils_2.32.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.32.bb
@@ -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"
+