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-30 11:37:23 +0100 |
commit | f66cc57e7282f7d278245dac0281f00e5131a934 (patch) | |
tree | 199da8377459f599b427e566850b63e1ae942414 /meta/recipes-devtools/gcc/gcc-configure-cross.inc | |
parent | 49aeaa3f67a700397d59d783390544a469ee17f7 (diff) | |
download | poky-f66cc57e7282f7d278245dac0281f00e5131a934.tar.gz |
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 <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-configure-cross.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-cross.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-cross.inc b/meta/recipes-devtools/gcc/gcc-configure-cross.inc index 774dadb89f..98961923ba 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 () { | |||
20 | export LD_FOR_TARGET="${TARGET_SYS}-ld" | 20 | export LD_FOR_TARGET="${TARGET_SYS}-ld" |
21 | export NM_FOR_TARGET="${TARGET_SYS}-nm" | 21 | export NM_FOR_TARGET="${TARGET_SYS}-nm" |
22 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" | 22 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" |
23 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
24 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
25 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
26 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
23 | } | 27 | } |
24 | 28 | ||
25 | LIBGCCS_VAR = "-lgcc_s" | 29 | LIBGCCS_VAR = "-lgcc_s" |