diff options
author | André Draszik <git@andred.net> | 2016-09-03 01:12:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-05 11:55:51 +0100 |
commit | 8ded5da8952e4a39851e0184bde323e01dd73d2c (patch) | |
tree | 8d00a97fe17bb8006ef0e7508c487afd9dbe2e71 /meta/recipes-support/boost | |
parent | 3e40a1d230a9c6f169f78c990b428019f321d90b (diff) | |
download | openembedded-core-8ded5da8952e4a39851e0184bde323e01dd73d2c.tar.gz openembedded-core-8ded5da8952e4a39851e0184bde323e01dd73d2c.tar.bz2 openembedded-core-8ded5da8952e4a39851e0184bde323e01dd73d2c.zip |
boost: fix MIPS16e compilation
Backport upstream patch to use g++ 4.1+ __sync intrinsics
instead of incompatible hand-written assembly when
compiling for MIPS16e
Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost')
-rw-r--r-- | meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch | 60 | ||||
-rw-r--r-- | meta/recipes-support/boost/boost_1.61.0.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch new file mode 100644 index 0000000000..2b48d0d5dd --- /dev/null +++ b/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch @@ -0,0 +1,60 @@ +From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 17:34:59 +0100 +Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o + + "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp" + +{standard input}: Assembler messages: +{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater +{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)' +{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)' +{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)' +{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)' +{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)' +{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)' +{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)' +{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)' +{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)' +{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)' +{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)' +{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)' +...failed updating 1 target... + +boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +contains hand-written MIPS assembly, which is not compatible +with the MIPS16e instruction set. + +By not using this file in MIPS16e mode, we fallback to using +g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and +__sync_val_compare_and_swap()) which are working fine. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418 + boost/smart_ptr/detail/sp_counted_base.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp +index 0addf07..0995ca8 100644 +--- a/boost/smart_ptr/detail/sp_counted_base.hpp ++++ b/boost/smart_ptr/detail/sp_counted_base.hpp +@@ -65,7 +65,7 @@ + #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> + +-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) ++#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> + + #elif defined( BOOST_SP_HAS_SYNC ) +-- +2.9.3 + diff --git a/meta/recipes-support/boost/boost_1.61.0.bb b/meta/recipes-support/boost/boost_1.61.0.bb index de482ee4f4..6926e84d50 100644 --- a/meta/recipes-support/boost/boost_1.61.0.bb +++ b/meta/recipes-support/boost/boost_1.61.0.bb @@ -7,4 +7,5 @@ SRC_URI += "\ file://boost-CVE-2012-2677.patch \ file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \ file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \ + file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \ " |