summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-package-no-fortran.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-package-no-fortran.inc')
-rw-r--r--meta/packages/gcc/gcc-package-no-fortran.inc103
1 files changed, 103 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-package-no-fortran.inc b/meta/packages/gcc/gcc-package-no-fortran.inc
new file mode 100644
index 0000000000..a5b5ad867a
--- /dev/null
+++ b/meta/packages/gcc/gcc-package-no-fortran.inc
@@ -0,0 +1,103 @@
1gcclibdir ?= "${libdir}/gcc"
2BINV ?= "${PV}"
3
4# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
5# packaged in the respective cross packages.
6PACKAGES = "${PN} ${PN}-symlinks \
7 g++ g++-symlinks \
8 cpp cpp-symlinks \
9 gcov gcov-symlinks \
10 libstdc++-dev libg2c-dev \
11 ${PN}-doc"
12
13FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
14 ${bindir}/${TARGET_PREFIX}gccbug \
15 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1 \
16 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
17 ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
18 ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
19 ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \
20 ${gcclibdir}/${TARGET_SYS}/${BINV}/include"
21FILES_${PN}-symlinks = "${bindir}/cc \
22 ${bindir}/gcc \
23 ${bindir}/gccbug"
24
25FILES_cpp = "${bindir}/${TARGET_PREFIX}cpp \
26 ${base_libdir}/cpp"
27FILES_cpp-symlinks = "${bindir}/cpp"
28
29FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
30FILES_gcov-symlinks = "${bindir}/gcov"
31
32PACKAGE_ARCH_libg2c-dev = "${TARGET_ARCH}"
33# Called from within gcc-cross, so libdir is set wrong
34FILES_libg2c-dev = "${libdir}/libg2c.so \
35 ${libdir}/libg2c.a \
36 ${libdir}/libfrtbegin.a"
37
38FILES_g++ = "${bindir}/${TARGET_PREFIX}g++ \
39 ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus"
40FILES_g++-symlinks = "${bindir}/c++ \
41 ${bindir}/g++"
42
43PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}"
44FILES_libstdc++-dev = "${includedir}/c++/${BINV} \
45 ${libdir}/libstdc++.so \
46 ${libdir}/libstdc++.la \
47 ${libdir}/libstdc++.a \
48 ${libdir}/libsupc++.la \
49 ${libdir}/libsupc++.a"
50
51FILES_${PN}-doc = "${infodir} \
52 ${mandir} \
53 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README"
54
55
56do_install () {
57 autotools_do_install
58
59 # Cleanup some of the ${libdir}{,exec}/gcc stuff ...
60 rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
61 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
62
63 # Hack around specs file assumptions
64 sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs &>/dev/null || true
65
66 # Move libgcc_s into /lib
67 mkdir -p ${D}${base_libdir}
68 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
69 rm ${D}${libdir}/libgcc_s.so
70 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
71 | tr -s / \
72 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
73 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
74
75 # We don't need libtool libraries
76 rm ${D}${libdir}/libg2c.la &>/dev/null || true
77
78
79 # Cleanup manpages..
80 rm -r ${D}${mandir}/man7
81
82 # We use libiberty from binutils
83 rm ${D}${libdir}/libiberty.a
84
85 cd ${D}${bindir}
86
87 # We care about g++ not c++
88 rm *c++
89
90 # We don't care about the gcc-<version> ones for this
91 rm *gcc-?.?*
92
93 # These sometimes show up, they are strange, we remove them
94 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
95
96 # Symlinks so we can use these trivially on the target
97 ln -sf ${TARGET_SYS}-g++ g++
98 ln -sf ${TARGET_SYS}-gcc gcc
99 ln -sf g++ c++
100 ln -sf gcc cc
101 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp
102 ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp
103}