sg3-utils: add newer buildable version
[openembedded.git] / recipes / gcc / gcc-configure-sdk.inc
1 require gcc-configure-common.inc
2
3 # The two lines below conflict, this needs fixing - RP
4 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
5 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}'
6
7 EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
8                       --with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
9                       --with-build-sysroot=${STAGING_DIR_TARGET}"
10
11 #
12 # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
13 # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
14 #
15 export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
16 export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
17 export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
18 export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
19 export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
20 export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
21 export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
22 export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
23 export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
24 export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
25
26 #
27 # We need to override this and make sure the compiler can find staging
28 #
29 export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
30
31 do_configure () {
32         export CC_FOR_BUILD="${BUILD_CC}"
33         export CXX_FOR_BUILD="${BUILD_CXX}"
34         export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}"
35         export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}"
36         export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}"
37         export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}"
38         (cd ${S} && gnu-configize) || die "failure running gnu-configize"
39         oe_runconf
40 }
41
42 do_compile () {
43         export CC="${BUILD_CC}"
44         export AR_FOR_TARGET="${TARGET_SYS}-ar"
45         export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
46         export LD_FOR_TARGET="${TARGET_SYS}-ld"
47         export NM_FOR_TARGET="${TARGET_SYS}-nm"
48         export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
49         base_do_compile
50 }