diff options
Diffstat (limited to 'meta/packages/gcc/gcc-package-target.inc')
-rw-r--r-- | meta/packages/gcc/gcc-package-target.inc | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-package-target.inc b/meta/packages/gcc/gcc-package-target.inc new file mode 100644 index 0000000000..2c19c5ecc7 --- /dev/null +++ b/meta/packages/gcc/gcc-package-target.inc | |||
@@ -0,0 +1,157 @@ | |||
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 | libmudflap libmudflap-dev \ | ||
9 | libgcc-dev \ | ||
10 | libstdc++-dev \ | ||
11 | libg2c-dev \ | ||
12 | libgfortran-dev \ | ||
13 | ${PN}-doc \ | ||
14 | " | ||
15 | |||
16 | FILES_${PN} = "\ | ||
17 | ${bindir}/${TARGET_PREFIX}gcc \ | ||
18 | ${bindir}/${TARGET_PREFIX}gccbug \ | ||
19 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \ | ||
20 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
21 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
22 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ | ||
23 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
24 | " | ||
25 | FILES_${PN}-symlinks = "\ | ||
26 | ${bindir}/cc \ | ||
27 | ${bindir}/gcc \ | ||
28 | ${bindir}/gccbug \ | ||
29 | " | ||
30 | |||
31 | FILES_g77 = "\ | ||
32 | ${bindir}/${TARGET_PREFIX}g77 \ | ||
33 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \ | ||
34 | " | ||
35 | FILES_g77-symlinks = "\ | ||
36 | ${bindir}/g77 \ | ||
37 | ${bindir}/f77 \ | ||
38 | " | ||
39 | FILES_gfortran = "\ | ||
40 | ${bindir}/${TARGET_PREFIX}gfortran \ | ||
41 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \ | ||
42 | " | ||
43 | FILES_gfortran-symlinks = "\ | ||
44 | ${bindir}/gfortran \ | ||
45 | ${bindir}/f95" | ||
46 | |||
47 | FILES_cpp = "\ | ||
48 | ${bindir}/${TARGET_PREFIX}cpp \ | ||
49 | ${base_libdir}/cpp \ | ||
50 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1" | ||
51 | FILES_cpp-symlinks = "${bindir}/cpp" | ||
52 | |||
53 | FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" | ||
54 | FILES_gcov-symlinks = "${bindir}/gcov" | ||
55 | |||
56 | FILES_libgcc = "${base_libdir}/libgcc*.so.*" | ||
57 | FILES_libgcc-dev = "${base_libdir}/libgcc*.so" | ||
58 | |||
59 | # Called from within gcc-cross, so libdir is set wrong | ||
60 | FILES_libg2c = "${target_libdir}/libg2c.so.*" | ||
61 | FILES_libg2c-dev = "\ | ||
62 | ${libdir}/libg2c.so \ | ||
63 | ${libdir}/libg2c.a \ | ||
64 | ${libdir}/libfrtbegin.a \ | ||
65 | " | ||
66 | |||
67 | FILES_g++ = "\ | ||
68 | ${bindir}/${TARGET_PREFIX}g++ \ | ||
69 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \ | ||
70 | " | ||
71 | FILES_g++-symlinks = "\ | ||
72 | ${bindir}/c++ \ | ||
73 | ${bindir}/g++ \ | ||
74 | " | ||
75 | |||
76 | FILES_libstdc++ = "${libdir}/libstdc++.so.*" | ||
77 | FILES_libstdc++-dev = "\ | ||
78 | ${includedir}/c++/${BINV} \ | ||
79 | ${libdir}/libstdc++.so \ | ||
80 | ${libdir}/libstdc++.la \ | ||
81 | ${libdir}/libstdc++.a \ | ||
82 | ${libdir}/libsupc++.la \ | ||
83 | ${libdir}/libsupc++.a \ | ||
84 | " | ||
85 | |||
86 | FILES_libgfortran-dev = "${libdir}/libgfortran.a \ | ||
87 | ${libdir}/libgfortran.so \ | ||
88 | ${libdir}/libgfortranbegin.a" | ||
89 | |||
90 | FILES_libmudflap = "${libdir}/libmudflap*.so.*" | ||
91 | FILES_libmudflap-dev = "\ | ||
92 | ${libdir}/libmudflap*.so \ | ||
93 | ${libdir}/libmudflap*.a \ | ||
94 | ${libdir}/libmudflap*.a \ | ||
95 | " | ||
96 | |||
97 | FILES_${PN}-doc = "\ | ||
98 | ${infodir} \ | ||
99 | ${mandir} \ | ||
100 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
101 | " | ||
102 | |||
103 | do_install () { | ||
104 | autotools_do_install | ||
105 | |||
106 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
107 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
108 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
109 | |||
110 | # Hack around specs file assumptions | ||
111 | 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 | ||
112 | |||
113 | # Move libgcc_s into /lib | ||
114 | mkdir -p ${D}${base_libdir} | ||
115 | if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then | ||
116 | mv ${D}${libdir}/nof/libgcc_s.so.* ${D}${base_libdir} | ||
117 | else | ||
118 | mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} | ||
119 | fi | ||
120 | rm -f ${D}${libdir}/libgcc_s.so | ||
121 | ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \ | ||
122 | | tr -s / \ | ||
123 | | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \ | ||
124 | ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so | ||
125 | |||
126 | # We don't need libtool libraries | ||
127 | rm -f ${D}${libdir}/libg2c.la &>/dev/null || true | ||
128 | |||
129 | # Cleanup manpages.. | ||
130 | rm -rf ${D}${mandir}/man7 | ||
131 | |||
132 | # We use libiberty from binutils | ||
133 | rm -f ${D}${libdir}/libiberty.a | ||
134 | |||
135 | cd ${D}${bindir} | ||
136 | |||
137 | # We care about g++ not c++ | ||
138 | rm -f *c++ | ||
139 | |||
140 | # We don't care about the gcc-<version> ones for this | ||
141 | rm -f *gcc-?.?* | ||
142 | |||
143 | # These sometimes show up, they are strange, we remove them | ||
144 | rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-* | ||
145 | |||
146 | # Symlinks so we can use these trivially on the target | ||
147 | ln -sf ${TARGET_SYS}-g77 g77 || true | ||
148 | ln -sf ${TARGET_SYS}-gfortran gfortran || true | ||
149 | ln -sf ${TARGET_SYS}-g++ g++ | ||
150 | ln -sf ${TARGET_SYS}-gcc gcc | ||
151 | ln -sf g77 f77 || true | ||
152 | ln -sf gfortran f95 || true | ||
153 | ln -sf g++ c++ | ||
154 | ln -sf gcc cc | ||
155 | ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp | ||
156 | ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp | ||
157 | } | ||