[oe-commits] org.oe.dev gcc4-build-sdk.inc: This fixes up some differences between gcc-cross and gcc-cross-sdk builds and fixes some of the ways the gcc-cross-builds can fail.

rpurdie commit openembedded-commits at lists.openembedded.org
Thu Mar 6 01:56:38 UTC 2008


gcc4-build-sdk.inc: This fixes up some differences between gcc-cross and gcc-cross-sdk builds and fixes some of the ways the gcc-cross-builds can fail.

Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 43c960d45911aef12f2312ce6684bc1c3678b4c1
ViewMTN: http://monotone.openembedded.org/revision/info/43c960d45911aef12f2312ce6684bc1c3678b4c1
Files:
1
packages/gcc/gcc4-build-sdk.inc
Diffs:

#
# mt diff -r1e1a77eae6fe6a2d41ed3698d3b19531a239d8ce -r43c960d45911aef12f2312ce6684bc1c3678b4c1
#
# 
# 
# patch "packages/gcc/gcc4-build-sdk.inc"
#  from [4bccd43b332808cf66e56b0cfcdcc722e35df86c]
#    to [78c161edfb4b6933f06b808a83edee6915d33b20]
# 
============================================================
--- packages/gcc/gcc4-build-sdk.inc	4bccd43b332808cf66e56b0cfcdcc722e35df86c
+++ packages/gcc/gcc4-build-sdk.inc	78c161edfb4b6933f06b808a83edee6915d33b20
@@ -1,12 +1,40 @@ USE_NLS = '${@base_conditional( "TARGET_
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
 
-EXTRA_OECONF += "--with-sysroot=${prefix}/${TARGET_SYS} --with-build-sysroot=${STAGING_DIR_TARGET}"
+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=/media/build1/builds/oe/angstrom/tmp/staging/arm-angstrom-linux-gnueabi"
+
 do_configure () {
-       (cd ${S} && gnu-configize) || die "failure running gnu-configize"
-       (cd ${S}/libstdc++-v3 && autoreconf)
-       oe_runconf
+	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 () {
@@ -16,5 +44,5 @@ do_compile () {
 	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}"
-	oe_runmake
+	base_do_compile
 }






More information about the Openembedded-commits mailing list