diff options
author | Mike Crowe <mac@mcrowe.com> | 2018-10-05 14:49:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-09 19:04:02 +0100 |
commit | bbf3a2ab515abd1b8784d0666ed5d9457d09e3b4 (patch) | |
tree | b3ca865999a625ac46819d1a64d865931384754e /meta/recipes-devtools | |
parent | 6006d4dd3f5d5b99f31a0cb4f125892480d0b980 (diff) | |
download | poky-bbf3a2ab515abd1b8784d0666ed5d9457d09e3b4.tar.gz |
gcc: Remove unnecessary --with-mpfr and --with-mpc when cross compiling
Passing --with-mpfr and --with-mpc when compiling the cross compiler
appears to be at best unnecessary, and at worst can cause build failures.
Firstly, the paths passed in gcc-cross-canadian are using the undefined
${layout_exec_prefix}. This results in configure passing
-I${STAGING_DIR_HOST}/include twice to the compiler when it's doing its
test builds. This is mostly pointless since that directory doesn't exist
with the default oe-core configuration - the correct path would be
-I${STAGING_DIR_HOST}/usr/include.
The path for mpfr passed in gcc-cross is correct, but unnecessary since it
is just the sysroot default.
I've gone back through the history, and it seems that these lines (or
similar ones) were originally added way back in
8800d8be25295dd7c7d84dde62c3be4df8e43346 for GCC 4.1.1 in 2006! I asked[1]
if anyone knew why this was necessary but received no response, so I can
only assume that no-one knows.
I've successfully built for various targets with this patch applied and
observed no problems.
[1] http://lists.openembedded.org/pipermail/openembedded-core/2018-September/155971.html
(From OE-Core rev: 2f9f02d5fda9884ccf9ae22ceb00d59b99036a49)
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index bdd6f7ec82..2f32d3407f 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -160,11 +160,6 @@ SYSTEMLIBS1 = "${target_libdir}/" | |||
160 | 160 | ||
161 | EXTRA_OECONF += "--enable-poison-system-directories" | 161 | EXTRA_OECONF += "--enable-poison-system-directories" |
162 | 162 | ||
163 | EXTRA_OECONF += "\ | ||
164 | --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \ | ||
165 | --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix} \ | ||
166 | " | ||
167 | |||
168 | EXTRA_OECONF_append_libc-baremetal = " --without-headers" | 163 | EXTRA_OECONF_append_libc-baremetal = " --without-headers" |
169 | EXTRA_OECONF_remove_libc-baremetal = "--with-sysroot=/not/exist" | 164 | EXTRA_OECONF_remove_libc-baremetal = "--with-sysroot=/not/exist" |
170 | EXTRA_OECONF_remove_libc-baremetal = "--with-build-sysroot=${STAGING_DIR_TARGET}" | 165 | EXTRA_OECONF_remove_libc-baremetal = "--with-build-sysroot=${STAGING_DIR_TARGET}" |
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 95f5968fd4..89b19684be 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -28,7 +28,6 @@ EXTRA_OECONF_append_sh4 = " \ | |||
28 | " | 28 | " |
29 | 29 | ||
30 | EXTRA_OECONF += "\ | 30 | EXTRA_OECONF += "\ |
31 | --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \ | ||
32 | --with-system-zlib \ | 31 | --with-system-zlib \ |
33 | " | 32 | " |
34 | 33 | ||