From f66cc57e7282f7d278245dac0281f00e5131a934 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 28 Mar 2012 07:22:44 -0700 Subject: gcc-configure: Pass distinct target flags When building gcc-cross-canadian libgcc is built using headers from gcc-crosssdk and not the target sysroot because we do not pass proper CFLAGS for target bits so it ends up using CFLAGS that were meant for compiling canadian gcc itself. It does not show up as a problem when building SDK with eglibc because eglibc-nativesdk and eglibc have identical headers. The problem shows up clearly when you try to build uclibc based meta-toolchain since then nativesdk libc and target libc are different (From OE-Core rev: 0e904103e9bd7fdb31bfcc129067511f9f45701b) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-configure-common.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/recipes-devtools/gcc/gcc-configure-common.inc') diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 9542dc9301..39b5f5223e 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -111,6 +111,10 @@ do_configure () { # 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}" + export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" (cd ${S} && gnu-configize) || die "failure running gnu-configize" oe_runconf -- cgit v1.2.3-54-g00ecf