diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-03-05 22:48:05 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-03-05 22:48:05 +0000 |
commit | 5530dca0be7f68ba3c716f9bd1a2f1867320ea74 (patch) | |
tree | f92beb9f677b7db031938e61561fba692b519952 /packages/gcc | |
parent | 28e6b6d397d81467cd2722a1116060500482d21a (diff) |
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.
Diffstat (limited to 'packages/gcc')
-rw-r--r-- | packages/gcc/gcc4-build-sdk.inc | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/packages/gcc/gcc4-build-sdk.inc b/packages/gcc/gcc4-build-sdk.inc index d6af5fe933..b66c716505 100644 --- a/packages/gcc/gcc4-build-sdk.inc +++ b/packages/gcc/gcc4-build-sdk.inc @@ -1,12 +1,40 @@ 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 } |