diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-06-01 01:02:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-03 16:38:45 +0100 |
commit | 7cd3c6028c0a868ddefa02aa73393f4b16a72b5c (patch) | |
tree | 8a16e08041e8e17163e256bd1511fc26db437153 /meta/recipes-support/boost | |
parent | 801436bf315e01e945e073ada79beaa98e824e0e (diff) | |
download | poky-7cd3c6028c0a868ddefa02aa73393f4b16a72b5c.tar.gz |
boost: fix build for mips
Backport 2 patches to fix the build error on mips:
mips-poky-linux-g++: error: unrecognized command line option '-m32'
https://github.com/boostorg/build/commit/c0634341d9ee2c02d3a55c91dafb988afc066c49
https://github.com/boostorg/build/commit/9576ca216cae888d7efb5da97c009c245c5ba567
Apply the pacthes to both bjam-native and boost, so put the patches to
"files" dir.
(From OE-Core rev: 729592223a0c076abe2c58a0cf3f4c6d6583602c)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost')
3 files changed, 77 insertions, 1 deletions
diff --git a/meta/recipes-support/boost/boost-1.58.0.inc b/meta/recipes-support/boost/boost-1.58.0.inc index 0bae81bcfa..b47d091335 100644 --- a/meta/recipes-support/boost/boost-1.58.0.inc +++ b/meta/recipes-support/boost/boost-1.58.0.inc | |||
@@ -11,7 +11,10 @@ BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" | |||
11 | BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" | 11 | BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" |
12 | BOOST_P = "boost_${BOOST_VER}" | 12 | BOOST_P = "boost_${BOOST_VER}" |
13 | 13 | ||
14 | SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2" | 14 | SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \ |
15 | file://0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch \ | ||
16 | file://0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch \ | ||
17 | " | ||
15 | 18 | ||
16 | SRC_URI[md5sum] = "b8839650e61e9c1c0a89f371dd475546" | 19 | SRC_URI[md5sum] = "b8839650e61e9c1c0a89f371dd475546" |
17 | SRC_URI[sha256sum] = "fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5" | 20 | SRC_URI[sha256sum] = "fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5" |
diff --git a/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch b/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch new file mode 100644 index 0000000000..329b4c3612 --- /dev/null +++ b/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 817aed0d755bf8c0ba4ef6a77d41538e50b571fd Mon Sep 17 00:00:00 2001 | ||
2 | From: claymore <carlosmf.pt@gmail.com> | ||
3 | Date: Fri, 24 Apr 2015 02:28:47 +0100 | ||
4 | Subject: [PATCH 1/2] mips1 fix added gcc.jam was passing the options -m32 and | ||
5 | -m64 to mips cross-compilers, when those do not use | ||
6 | such options This modification solves it by adding mips | ||
7 | as an exception | ||
8 | |||
9 | Signed-off-by: Carlos M. Ferreira carlosmf.pt@gmail.com | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
13 | |||
14 | --- | ||
15 | tools/build/src/tools/gcc.jam | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam | ||
19 | index db04534..eff95ae 100644 | ||
20 | --- a/tools/build/src/tools/gcc.jam | ||
21 | +++ b/tools/build/src/tools/gcc.jam | ||
22 | @@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * ) | ||
23 | else | ||
24 | { | ||
25 | local arch = [ feature.get-values architecture : $(properties) ] ; | ||
26 | - if $(arch) != arm | ||
27 | + if $(arch) != arm && $(arch) != mips1 | ||
28 | { | ||
29 | if $(model) = 32 | ||
30 | { | ||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch b/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch new file mode 100644 index 0000000000..ecf7e550f8 --- /dev/null +++ b/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From f825634a56b119dfa9d712119a66279cc7635978 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks> | ||
3 | Date: Sat, 2 May 2015 14:24:02 +0200 | ||
4 | Subject: [PATCH 2/2] Don't pass -m32/-m64 where it's not supported. | ||
5 | |||
6 | Only PowerPC, SPARC, and x86 do support the -m32 and -m64 compiler options [1]. | ||
7 | |||
8 | Rather then excluding all architectures not supporting these options as it is | ||
9 | done in commit c0634341d9ee2c02d3a55c91dafb988afc066c49 [2], include all | ||
10 | architectures that do support them. | ||
11 | |||
12 | This will fix building Boost for the SuperH architecture with Buildroot [3]. | ||
13 | |||
14 | [1] https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html | ||
15 | [2] https://github.com/boostorg/build/commit/c0634341d9ee2c02d3a55c91dafb988afc066c49 | ||
16 | [3] http://autobuild.buildroot.net/results/ccd/ccd5c83963032ba49b1627b1dff39e34a9486943/build-end.log | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
20 | |||
21 | --- | ||
22 | tools/build/src/tools/gcc.jam | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam | ||
26 | index eff95ae..2f6af93 100644 | ||
27 | --- a/tools/build/src/tools/gcc.jam | ||
28 | +++ b/tools/build/src/tools/gcc.jam | ||
29 | @@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * ) | ||
30 | else | ||
31 | { | ||
32 | local arch = [ feature.get-values architecture : $(properties) ] ; | ||
33 | - if $(arch) != arm && $(arch) != mips1 | ||
34 | + if $(arch) = power || $(arch) = sparc || $(arch) = x86 | ||
35 | { | ||
36 | if $(model) = 32 | ||
37 | { | ||
38 | -- | ||
39 | 1.7.9.5 | ||
40 | |||