[oe-commits] Richard Purdie : gcc: fix collect2 host contamination problem properly

git at git.openembedded.org git at git.openembedded.org
Thu Jul 5 11:37:59 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: af58d5c3a5c5e632aa20b1d007d47dbbfb4ed6e6
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=af58d5c3a5c5e632aa20b1d007d47dbbfb4ed6e6

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Thu Jul  5 10:30:14 2012 +0000

gcc: fix collect2 host contamination problem properly

We added the autoconf cache line a while back to ensure that configure doesn't
poke into some hardcoded host paths looking for things it shouldn't. Applying
it as part of do_configure wasn't getting it to the do_compile tasks
where much of the configure scripts are run by gcc. This changes it to a simple
export to ensure it reaches the places it needs to and truly gets rid of
the cross compile badness messages from the logs.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/gcc/gcc-configure-common.inc |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 4d11ef4..3dd9de7 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -46,6 +46,11 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) !=
                 ${@get_gcc_mips_plt_setting(bb, d)} \
                 ${@get_gcc_multiarch_setting(bb, d)}"
 
+export gcc_cv_collect2_libs = 'none required'
+# We need to set gcc_cv_collect2_libs else there is cross-compilation badness
+# in the config.log files (which might not get generated until do_compile
+# hence being missed by the insane do_configure check).
+
 # Build uclibc compilers without cxa_atexit support
 EXTRA_OECONF_append_linux               = " --enable-__cxa_atexit"
 EXTRA_OECONF_append_libc-uclibc        = " --enable-__cxa_atexit"
@@ -110,10 +115,6 @@ do_configure () {
 	export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
 	export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
 	export ARCH_FLAGS_FOR_TARGET="${ARCH_FLAGS_FOR_TARGET}"
-	# We need to set this else there is cross-compilation badness
-	# in the config.log files (which might not get generated until do_compile
-	# hence being missed by the insane do_configure check).
-	export gcc_cv_collect2_libs="none required"
 	export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}"
 	export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
 	export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"





More information about the Openembedded-commits mailing list