Another pass of .oe cleanups.
[vuplus_openembedded] / gcc / gcc-uclibc-cross_3.3.3.oe
1 inherit cross
2 include gcc-uclibc_${PV}.oe
3
4 DEPENDS := virtual/${TARGET_PREFIX}binutils uclibc patcher-native
5 PROVIDES := virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++
6
7 PACKAGES =
8
9 EXTRA_OECONF := --with-local-prefix=${CROSS_DIR}/local \
10                 --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++ \
11                 --enable-target-optspace \
12                 --disable-nls \
13                 --with-gnu-ld \
14                 --disable-__cxa_atexit \
15                 --enable-languages=c,c++ \
16                 --enable-shared \
17                 --enable-threads \
18                 --enable-multilib \
19                 --program-prefix=${TARGET_PREFIX}
20
21 export CPPFLAGS =
22 export CXXFLAGS =
23 export CFLAGS =
24 export LDFLAGS =
25
26 do_configure () {
27         export CC="${BUILD_CC}"
28         export AR="${TARGET_SYS}-ar"
29         export RANLIB="${TARGET_SYS}-ranlib"
30         export LD="${TARGET_SYS}-ld"
31         export NM="${TARGET_SYS}-nm"
32         oe_runconf
33 }
34
35 do_compile_prepend () {
36         export CC="${BUILD_CC}"
37         export AR_FOR_TARGET="${TARGET_SYS}-ar"
38         export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
39         export LD_FOR_TARGET="${TARGET_SYS}-ld"
40         export NM_FOR_TARGET="${TARGET_SYS}-nm"
41         export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
42 }
43
44 do_stage_append () {
45         for d in info man share/doc share/locale ; do
46                 rm -rf ${CROSS_DIR}/$d
47         done
48
49         # These aren't useful on the cross toolchain
50         rm -f ${CROSS_DIR}/bin/*gcov
51         rm -f ${CROSS_DIR}/bin/*gccbug
52
53         # Fix a few include links so cross builds are happier
54         if [ ! -e ${STAGING_INCDIR}/c++ ]; then
55                 mkdir -p ${STAGING_INCDIR}
56                 ln -s ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
57                         ${STAGING_INCDIR}/
58         fi
59
60         # We use libiberty from binutils
61         rm -f ${CROSS_DIR}/lib/libiberty.a
62
63         # We probably don't need this
64         rmdir ${CROSS_DIR}/include || :
65
66         # We don't really need to keep this around
67         rm -rf ${CROSS_DIR}/share
68 }
69
70 # Kill the install so we get no packages (we're the cross compiler)
71 do_install () {
72         :
73 }
74