]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Remove unnecessary --with-mpfr and --with-mpc when cross compiling
authorMike Crowe <mac@mcrowe.com>
Fri, 5 Oct 2018 13:49:13 +0000 (14:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 9 Oct 2018 11:02:41 +0000 (12:02 +0100)
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

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-cross-canadian.inc
meta/recipes-devtools/gcc/gcc-cross.inc

index bdd6f7ec82fc27047e7103ab32766aa615dff245..2f32d3407fba8a3236393279252af3e7711abbe3 100644 (file)
@@ -160,11 +160,6 @@ SYSTEMLIBS1 = "${target_libdir}/"
 
 EXTRA_OECONF += "--enable-poison-system-directories"
 
-EXTRA_OECONF += "\
-    --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
-    --with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix} \
-"
-
 EXTRA_OECONF_append_libc-baremetal = " --without-headers"
 EXTRA_OECONF_remove_libc-baremetal = "--with-sysroot=/not/exist"
 EXTRA_OECONF_remove_libc-baremetal = "--with-build-sysroot=${STAGING_DIR_TARGET}"
index 95f5968fd4a14665a78a8a7db53dd95c2382df48..89b19684befcafd340bc2039722e56c39bacd9f3 100644 (file)
@@ -28,7 +28,6 @@ EXTRA_OECONF_append_sh4 = " \
 "
 
 EXTRA_OECONF += "\
-    --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
     --with-system-zlib \
 "