summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-package.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-package.inc')
-rw-r--r--meta/packages/gcc/gcc-package.inc40
1 files changed, 28 insertions, 12 deletions
diff --git a/meta/packages/gcc/gcc-package.inc b/meta/packages/gcc/gcc-package.inc
index 22c1d809db..3be1f2f0e0 100644
--- a/meta/packages/gcc/gcc-package.inc
+++ b/meta/packages/gcc/gcc-package.inc
@@ -1,14 +1,14 @@
1gcclibdir ?= "${libdir}/gcc" 1gcclibdir ?= "${libdir}/gcc"
2BINV ?= "${PV}" 2BINV ?= "${PV}"
3 3
4# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually 4PACKAGES = "libgcc ${PN} ${PN}-symlinks \
5# packaged in the respective cross packages.
6PACKAGES = "${PN} ${PN}-symlinks \
7 g++ g++-symlinks \ 5 g++ g++-symlinks \
8 cpp cpp-symlinks \ 6 cpp cpp-symlinks \
9 g77 g77-symlinks \ 7 g77 g77-symlinks \
10 gcov gcov-symlinks \ 8 gcov gcov-symlinks \
11 libstdc++-dev libg2c-dev \ 9 libmudflap libmudflap-dev \
10 libstdc++ libg2c \
11 libstdc++-dev libg2c-dev \
12 ${PN}-doc" 12 ${PN}-doc"
13 13
14FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \ 14FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
@@ -35,7 +35,11 @@ FILES_cpp-symlinks = "${bindir}/cpp"
35FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" 35FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
36FILES_gcov-symlinks = "${bindir}/gcov" 36FILES_gcov-symlinks = "${bindir}/gcov"
37 37
38FILES_libgcc = "${base_libdir}/libgcc*.so.*"
39FILES_libgcc-dev = "${base_libdir}/libgcc*.so"
40
38# Called from within gcc-cross, so libdir is set wrong 41# Called from within gcc-cross, so libdir is set wrong
42FILES_libg2c = "${target_libdir}/libg2c.so.*"
39FILES_libg2c-dev = "${libdir}/libg2c.so \ 43FILES_libg2c-dev = "${libdir}/libg2c.so \
40 ${libdir}/libg2c.a \ 44 ${libdir}/libg2c.a \
41 ${libdir}/libfrtbegin.a" 45 ${libdir}/libfrtbegin.a"
@@ -45,6 +49,7 @@ FILES_g++ = "${bindir}/${TARGET_PREFIX}g++ \
45FILES_g++-symlinks = "${bindir}/c++ \ 49FILES_g++-symlinks = "${bindir}/c++ \
46 ${bindir}/g++" 50 ${bindir}/g++"
47 51
52FILES_libstdc++ = "${libdir}/libstdc++.so.*"
48FILES_libstdc++-dev = "${includedir}/c++/${BINV} \ 53FILES_libstdc++-dev = "${includedir}/c++/${BINV} \
49 ${libdir}/libstdc++.so \ 54 ${libdir}/libstdc++.so \
50 ${libdir}/libstdc++.la \ 55 ${libdir}/libstdc++.la \
@@ -52,10 +57,22 @@ FILES_libstdc++-dev = "${includedir}/c++/${BINV} \
52 ${libdir}/libsupc++.la \ 57 ${libdir}/libsupc++.la \
53 ${libdir}/libsupc++.a" 58 ${libdir}/libsupc++.a"
54 59
60FILES_libmudflap = "${libdir}/libmudflap*.so.*"
61FILES_libmudflap-dev = "${libdir}/libmudflap*.so \
62 ${libdir}/libmudflap*.a \
63 ${libdir}/libmudflap*.a"
64
65
55FILES_${PN}-doc = "${infodir} \ 66FILES_${PN}-doc = "${infodir} \
56 ${mandir} \ 67 ${mandir} \
57 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README" 68 ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README"
58 69
70python do_package() {
71 if bb.data.getVar('DEBIAN_NAMES', d, 1):
72 bb.data.setVar('PKG_libgcc', 'libgcc1', d)
73 bb.build.exec_func('package_do_package', d)
74}
75
59 76
60do_install () { 77do_install () {
61 autotools_do_install 78 autotools_do_install
@@ -65,34 +82,33 @@ do_install () {
65 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools 82 rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
66 83
67 # Hack around specs file assumptions 84 # Hack around specs file assumptions
68 sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs &>/dev/null || true 85 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
69 86
70 # Move libgcc_s into /lib 87 # Move libgcc_s into /lib
71 mkdir -p ${D}${base_libdir} 88 mkdir -p ${D}${base_libdir}
72 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir} 89 mv ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
73 rm ${D}${libdir}/libgcc_s.so 90 rm -f ${D}${libdir}/libgcc_s.so
74 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \ 91 ln -sf `echo ${libdir}/gcc/${TARGET_SYS}/${BINV} \
75 | tr -s / \ 92 | tr -s / \
76 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \ 93 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.1 \
77 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so 94 ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcc_s.so
78 95
79 # We don't need libtool libraries 96 # We don't need libtool libraries
80 rm ${D}${libdir}/libg2c.la &>/dev/null || true 97 rm -f ${D}${libdir}/libg2c.la &>/dev/null || true
81
82 98
83 # Cleanup manpages.. 99 # Cleanup manpages..
84 rm -r ${D}${mandir}/man7 100 rm -rf ${D}${mandir}/man7
85 101
86 # We use libiberty from binutils 102 # We use libiberty from binutils
87 rm ${D}${libdir}/libiberty.a 103 rm -f ${D}${libdir}/libiberty.a
88 104
89 cd ${D}${bindir} 105 cd ${D}${bindir}
90 106
91 # We care about g++ not c++ 107 # We care about g++ not c++
92 rm *c++ 108 rm -f *c++
93 109
94 # We don't care about the gcc-<version> ones for this 110 # We don't care about the gcc-<version> ones for this
95 rm *gcc-?.?* 111 rm -f *gcc-?.?*
96 112
97 # These sometimes show up, they are strange, we remove them 113 # These sometimes show up, they are strange, we remove them
98 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-* 114 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*