1 gcclibdir ?= "${libdir}/gcc"
4 # libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
5 # packaged in the respective cross packages.
6 PACKAGES = "${PN} ${PN}-symlinks \
11 libstdc++-dev libg2c-dev \
14 FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
15 ${bindir}/${TARGET_PREFIX}gccbug \
16 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \
17 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
18 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
19 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
20 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
21 ${gcclibdir}/${TARGET_SYS}/${BINV}/include"
22 FILES_${PN}-symlinks = "${bindir}/cc \
26 FILES_g77 = "${bindir}/${TARGET_PREFIX}g77 \
27 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771"
28 FILES_g77-symlinks = "${bindir}/g77 \
31 FILES_cpp = "${bindir}/${TARGET_PREFIX}cpp \
33 FILES_cpp-symlinks = "${bindir}/cpp"
35 FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
36 FILES_gcov-symlinks = "${bindir}/gcov"
38 # Called from within gcc-cross, so libdir is set wrong
39 FILES_libg2c-dev = "${libdir}/libg2c.so \
41 ${libdir}/libfrtbegin.a"
43 FILES_g++ = "${bindir}/${TARGET_PREFIX}g++ \
44 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus"
45 FILES_g++-symlinks = "${bindir}/c++ \
48 FILES_libstdc++-dev = "${includedir}/c++/${BINV} \
49 ${libdir}/libstdc++.so \
50 ${libdir}/libstdc++.la \
51 ${libdir}/libstdc++.a \
52 ${libdir}/libsupc++.la \
53 ${libdir}/libsupc++.a"
55 FILES_${PN}-doc = "${infodir} \
57 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README"
63 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
64 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
65 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
67 # Hack around specs file assumptions
68 test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
70 # Move libgcc_s into /lib
71 mkdir -p ${D}${base_libdir}
72 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
73 rm -f ${D}${libdir}/libgcc_s.so
74 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
76 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
77 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
79 # We don't need libtool libraries
80 rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
83 rm -rf ${D}${mandir}/man7
85 # We use libiberty from binutils
86 rm -f ${D}${libdir}/libiberty.a
90 # We care about g++ not c++
93 # We don't care about the gcc-<version> ones for this
96 # These sometimes show up, they are strange, we remove them
97 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
99 # Symlinks so we can use these trivially on the target
100 ln -sf ${TARGET_SYS}-g77 g77
101 ln -sf ${TARGET_SYS}-g++ g++
102 ln -sf ${TARGET_SYS}-gcc gcc
106 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
107 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp