openmoko-session2: add RDEPENDS openmoko-panel-memory and oe-stylize
[vuplus_openembedded] / packages / gcc / gcc-package-sdk.inc
1 #
2 # Note gcc-package.inc was already included before us. 
3 #
4 # We override PACKAGES and FILES to change the packaging
5 #
6
7 INHIBIT_PACKAGE_STRIP ?= ""
8 HAS_G2C ?= "yes"
9 HAS_GFORTRAN ?= "no"
10 OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
11 INHIBIT_PACKAGE_STRIP = "1"
12
13 # Having anything auto depending on gcc-cross-sdk is a really bad idea...
14 EXCLUDE_FROM_SHLIBS = "1"
15
16 PACKAGES = "${PN} ${PN}-doc"
17
18 FILES_${PN} = "\
19     ${bindir}/* \
20     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \
21     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
22     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
23     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
24     ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
25     ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
26     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
27     ${gcclibdir}/${TARGET_SYS}/${BINV}/include \
28     ${includedir}/c++/${BINV} \
29     ${prefix}/${TARGET_SYS}/bin/* \
30     ${prefix}/${TARGET_SYS}/lib/* \
31     "
32 do_install () {
33         oe_runmake 'DESTDIR=${D}' install
34
35         # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
36         rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
37         rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
38
39         # We care about g++ not c++
40         rm -f ${D}${bindir}/*c++
41
42         # We don't care about the gcc-<version> copies
43         rm -f ${D}${bindir}/*gcc-?.?*
44
45         # We use libiberty from binutils
46         rm -f ${D}${prefix}/${TARGET_SYS}/lib/libiberty.a
47         rm -f ${D}${libdir}/libiberty.a
48
49         # Create the ${prefix}/${TARGET_SYS}/bin/* symlinks
50         install -d ${D}${prefix}/${TARGET_SYS}/bin/
51         for l in ${D}${bindir}/*; do
52                 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
53         done
54         ln -sf "${bindir}/${TARGET_PREFIX}gcc" "${D}${prefix}/${TARGET_SYS}/bin/cc"
55
56         # Manually run the target stripper since we won't get it run by
57         # the packaging.
58         if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
59                 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.*
60                 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* || true
61                 ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.*
62         fi
63 }
64