summaryrefslogtreecommitdiff
path: root/meta/packages/gcc/gcc-configure-sdk.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-18 10:41:39 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-18 10:41:39 +0000
commit1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf (patch)
tree293d34ede70b906b04967ac077e32a8fee4e855b /meta/packages/gcc/gcc-configure-sdk.inc
parent402c7dcb2790bd51de9436befe8c273e538be441 (diff)
downloadopenembedded-core-1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf.tar.gz
openembedded-core-1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf.tar.bz2
openembedded-core-1255ee64ee58fb5f0acd0bdbf4f0a54afd5ceeaf.zip
gcc: Merge in the major cleanup I made in OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4038 311d38ba-8fff-0310-9ca6-ca027cbcb966
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 @@
+require gcc-configure-common.inc
+
+# The two lines below conflict, this needs fixing - RP
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
+
+EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
+ --with-sysroot=${prefix}/${TARGET_SYS} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+#
+# gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
+# for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
+#
+export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
+export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
+export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
+export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
+export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
+export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
+export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
+export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
+export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
+export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
+
+#
+# We need to override this and make sure the compiler can find staging
+#
+export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
+
+do_configure () {
+ export CC_FOR_BUILD="${BUILD_CC}"
+ export CXX_FOR_BUILD="${BUILD_CXX}"
+ export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
+ export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
+ export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
+ export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_compile () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ 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}"
+ base_do_compile
+}