diff options
Diffstat (limited to 'recipes-devtools/gcc/gcc-package-target.inc')
| -rw-r--r-- | recipes-devtools/gcc/gcc-package-target.inc | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-package-target.inc b/recipes-devtools/gcc/gcc-package-target.inc new file mode 100644 index 0000000000..3286da6a95 --- /dev/null +++ b/recipes-devtools/gcc/gcc-package-target.inc | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | PACKAGES = "\ | ||
| 2 | ${PN} ${PN}-symlinks \ | ||
| 3 | g++ g++-symlinks \ | ||
| 4 | cpp cpp-symlinks \ | ||
| 5 | g77 g77-symlinks \ | ||
| 6 | gfortran gfortran-symlinks \ | ||
| 7 | gcov gcov-symlinks \ | ||
| 8 | ${PN}-doc \ | ||
| 9 | " | ||
| 10 | |||
| 11 | FILES_${PN} = "\ | ||
| 12 | ${bindir}/${TARGET_PREFIX}gcc \ | ||
| 13 | ${bindir}/${TARGET_PREFIX}gccbug \ | ||
| 14 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \ | ||
| 15 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
| 16 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
| 17 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ | ||
| 18 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
| 19 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
| 20 | " | ||
| 21 | FILES_${PN}-symlinks = "\ | ||
| 22 | ${bindir}/cc \ | ||
| 23 | ${bindir}/gcc \ | ||
| 24 | ${bindir}/gccbug \ | ||
| 25 | " | ||
| 26 | |||
| 27 | FILES_g77 = "\ | ||
| 28 | ${bindir}/${TARGET_PREFIX}g77 \ | ||
| 29 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \ | ||
| 30 | " | ||
| 31 | FILES_g77-symlinks = "\ | ||
| 32 | ${bindir}/g77 \ | ||
| 33 | ${bindir}/f77 \ | ||
| 34 | " | ||
| 35 | FILES_gfortran = "\ | ||
| 36 | ${bindir}/${TARGET_PREFIX}gfortran \ | ||
| 37 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \ | ||
| 38 | " | ||
| 39 | FILES_gfortran-symlinks = "\ | ||
| 40 | ${bindir}/gfortran \ | ||
| 41 | ${bindir}/f95" | ||
| 42 | |||
| 43 | FILES_cpp = "\ | ||
| 44 | ${bindir}/${TARGET_PREFIX}cpp \ | ||
| 45 | ${base_libdir}/cpp \ | ||
| 46 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1" | ||
| 47 | FILES_cpp-symlinks = "${bindir}/cpp" | ||
| 48 | |||
| 49 | FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" | ||
| 50 | FILES_gcov-symlinks = "${bindir}/gcov" | ||
| 51 | |||
| 52 | FILES_g++ = "\ | ||
| 53 | ${bindir}/${TARGET_PREFIX}g++ \ | ||
| 54 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \ | ||
| 55 | " | ||
| 56 | FILES_g++-symlinks = "\ | ||
| 57 | ${bindir}/c++ \ | ||
| 58 | ${bindir}/g++ \ | ||
| 59 | " | ||
| 60 | |||
| 61 | |||
| 62 | FILES_${PN}-doc = "\ | ||
| 63 | ${infodir} \ | ||
| 64 | ${mandir} \ | ||
| 65 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
| 66 | " | ||
| 67 | |||
| 68 | do_install () { | ||
| 69 | oe_runmake 'DESTDIR=${D}' install-host | ||
| 70 | |||
| 71 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
| 72 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
| 73 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
| 74 | |||
| 75 | # Hack around specs file assumptions | ||
| 76 | 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 | ||
| 77 | |||
| 78 | # Cleanup manpages.. | ||
| 79 | rm -rf ${D}${mandir}/man7 | ||
| 80 | |||
| 81 | cd ${D}${bindir} | ||
| 82 | |||
| 83 | # We care about g++ not c++ | ||
| 84 | rm -f *c++ | ||
| 85 | |||
| 86 | # We don't care about the gcc-<version> ones for this | ||
| 87 | rm -f *gcc-?.?* | ||
| 88 | |||
| 89 | # Symlinks so we can use these trivially on the target | ||
| 90 | ln -sf ${TARGET_SYS}-g77 g77 || true | ||
| 91 | ln -sf ${TARGET_SYS}-gfortran gfortran || true | ||
| 92 | ln -sf ${TARGET_SYS}-g++ g++ | ||
| 93 | ln -sf ${TARGET_SYS}-gcc gcc | ||
| 94 | ln -sf g77 f77 || true | ||
| 95 | ln -sf gfortran f95 || true | ||
| 96 | ln -sf g++ c++ | ||
| 97 | ln -sf gcc cc | ||
| 98 | ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp | ||
| 99 | } | ||
