summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc3-build-cross.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc3-build-cross.inc')
-rw-r--r--meta/packages/gcc/gcc3-build-cross.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc3-build-cross.inc b/meta/packages/gcc/gcc3-build-cross.inc
new file mode 100644
index 0000000000..384886c76e
--- /dev/null
+++ b/meta/packages/gcc/gcc3-build-cross.inc
@@ -0,0 +1,47 @@
1USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
2
3EXTRA_OECONF_PATHS = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
4 --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++"
5
6do_configure_prepend () {
7 rm -f ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a
8}
9
10do_compile_prepend () {
11 export CC="${BUILD_CC}"
12 export AR_FOR_TARGET="${TARGET_SYS}-ar"
13 export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
14 export LD_FOR_TARGET="${TARGET_SYS}-ld"
15 export NM_FOR_TARGET="${TARGET_SYS}-nm"
16 export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
17}
18
19do_stage_append () {
20 for d in info man share/doc share/locale ; do
21 rm -rf ${CROSS_DIR}/$d
22 done
23
24 # These aren't useful on the cross toolchain
25 rm -f ${CROSS_DIR}/bin/*gcov
26 rm -f ${CROSS_DIR}/bin/*gccbug
27
28 # Fix a few include links so cross builds are happier
29 if [ ! -e ${STAGING_INCDIR}/c++ ]; then
30 mkdir -p ${STAGING_INCDIR}
31 ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
32 ${STAGING_INCDIR}/
33 fi
34
35 # We use libiberty from binutils
36 rm -f ${CROSS_DIR}/lib/libiberty.a
37
38 # We probably don't need these
39 rmdir ${CROSS_DIR}/include || :
40
41 # We don't really need to keep this around
42 # rm -rf ${CROSS_DIR}/share but leave java there
43 for d in share/man share/info;
44 do
45 rm -rf ${CROSS_DIR}/$d
46 done
47}