summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-configure-cross.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-configure-cross.inc')
-rw-r--r--meta/packages/gcc/gcc-configure-cross.inc56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-configure-cross.inc b/meta/packages/gcc/gcc-configure-cross.inc
new file mode 100644
index 0000000000..ca7a6b5869
--- /dev/null
+++ b/meta/packages/gcc/gcc-configure-cross.inc
@@ -0,0 +1,56 @@
1require gcc-configure-common.inc
2
3USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
4
5EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
6 --with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
7 --with-sysroot=${STAGING_DIR_TARGET} \
8 --with-build-sysroot=${STAGING_DIR_TARGET}"
9
10do_configure_prepend () {
11 rm -f ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a
12}
13
14do_compile_prepend () {
15 export CC="${BUILD_CC}"
16 export AR_FOR_TARGET="${TARGET_SYS}-ar"
17 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
18 export LD_FOR_TARGET="${TARGET_SYS}-ld"
19 export NM_FOR_TARGET="${TARGET_SYS}-nm"
20 export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
21}
22
23LIBGCCS_VAR = "-lgcc_s"
24LIBGCCS_VAR_avr32 = ""
25
26do_stage_append () {
27 for d in info man share/doc share/locale ; do
28 rm -rf ${CROSS_DIR}/$d
29 done
30
31 # Fix a few include links so cross builds are happier
32 if [ ! -e ${STAGING_INCDIR}/c++ ]; then
33 mkdir -p ${STAGING_INCDIR}
34 ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
35 ${STAGING_INCDIR}/
36 fi
37
38 # We use libiberty from binutils
39 rm -f ${CROSS_DIR}/lib/libiberty.a
40
41 # We probably don't need these
42 rmdir ${CROSS_DIR}/include || :
43
44 # We don't really need to keep this around
45 # rm -rf ${CROSS_DIR}/share but leave java there
46 for d in share/man share/info;
47 do
48 rm -rf ${CROSS_DIR}/$d
49 done
50
51 #fix up libsupc++ and libstdc++ la files
52 sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libsupc++.la || true
53 sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libstdc++.la || true
54}
55
56do_package_write_ipk[depends] += "virtual/libc:do_package