diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-03-28 07:22:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-26 14:48:47 +0100 |
commit | 0e904103e9bd7fdb31bfcc129067511f9f45701b (patch) | |
tree | 66672d52edd71e8e3aa04093d9919cd35694b889 /meta/recipes-devtools/gcc | |
parent | 1f9c07d8a086a3dc3bb68eaabd56a1b1730306ff (diff) | |
download | openembedded-core-0e904103e9bd7fdb31bfcc129067511f9f45701b.tar.gz openembedded-core-0e904103e9bd7fdb31bfcc129067511f9f45701b.tar.bz2 openembedded-core-0e904103e9bd7fdb31bfcc129067511f9f45701b.tar.xz openembedded-core-0e904103e9bd7fdb31bfcc129067511f9f45701b.zip |
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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-common.inc | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-cross.inc | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-sdk.inc | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 9542dc930..39b5f5223 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 diff --git a/meta/recipes-devtools/gcc/gcc-configure-cross.inc b/meta/recipes-devtools/gcc/gcc-configure-cross.inc index 774dadb89..98961923b 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-cross.inc @@ -20,6 +20,10 @@ do_compile_prepend () { export LD_FOR_TARGET="${TARGET_SYS}-ld" export NM_FOR_TARGET="${TARGET_SYS}-nm" export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" + export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" + export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" + export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" + export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" } LIBGCCS_VAR = "-lgcc_s" diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc index eb6757cdc..6aac0ad88 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc @@ -39,6 +39,10 @@ do_configure () { export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" + 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 } |