summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-configure-sdk.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-configure-sdk.inc')
-rw-r--r--meta/packages/gcc/gcc-configure-sdk.inc51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-configure-sdk.inc b/meta/packages/gcc/gcc-configure-sdk.inc
new file mode 100644
index 0000000000..f8c4de8c78
--- /dev/null
+++ b/meta/packages/gcc/gcc-configure-sdk.inc
@@ -0,0 +1,51 @@
1require gcc-configure-common.inc
2
3# The two lines below conflict, this needs fixing - RP
4USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
5USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
6
7EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
8 --with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
9 --with-sysroot=${prefix}/${TARGET_SYS} \
10 --with-build-sysroot=${STAGING_DIR_TARGET}"
11
12#
13# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
14# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
15#
16export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
17export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
18export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
19export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
20export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
21export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
22export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
23export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
24export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
25export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
26
27#
28# We need to override this and make sure the compiler can find staging
29#
30export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
31
32do_configure () {
33 export CC_FOR_BUILD="${BUILD_CC}"
34 export CXX_FOR_BUILD="${BUILD_CXX}"
35 export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
36 export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
37 export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
38 export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
39 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
40 oe_runconf
41}
42
43do_compile () {
44 export CC="${BUILD_CC}"
45 export AR_FOR_TARGET="${TARGET_SYS}-ar"
46 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
47 export LD_FOR_TARGET="${TARGET_SYS}-ld"
48 export NM_FOR_TARGET="${TARGET_SYS}-nm"
49 export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
50 base_do_compile
51}