summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-package-target.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-package-target.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-target.inc99
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-package-target.inc b/meta/recipes-devtools/gcc/gcc-package-target.inc
new file mode 100644
index 0000000000..3286da6a95
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-package-target.inc
@@ -0,0 +1,99 @@
1PACKAGES = "\
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
11FILES_${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"
21FILES_${PN}-symlinks = "\
22 ${bindir}/cc \
23 ${bindir}/gcc \
24 ${bindir}/gccbug \
25"
26
27FILES_g77 = "\
28 ${bindir}/${TARGET_PREFIX}g77 \
29 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
30"
31FILES_g77-symlinks = "\
32 ${bindir}/g77 \
33 ${bindir}/f77 \
34"
35FILES_gfortran = "\
36 ${bindir}/${TARGET_PREFIX}gfortran \
37 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
38"
39FILES_gfortran-symlinks = "\
40 ${bindir}/gfortran \
41 ${bindir}/f95"
42
43FILES_cpp = "\
44 ${bindir}/${TARGET_PREFIX}cpp \
45 ${base_libdir}/cpp \
46 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
47FILES_cpp-symlinks = "${bindir}/cpp"
48
49FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
50FILES_gcov-symlinks = "${bindir}/gcov"
51
52FILES_g++ = "\
53 ${bindir}/${TARGET_PREFIX}g++ \
54 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
55"
56FILES_g++-symlinks = "\
57 ${bindir}/c++ \
58 ${bindir}/g++ \
59"
60
61
62FILES_${PN}-doc = "\
63 ${infodir} \
64 ${mandir} \
65 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
66"
67
68do_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}