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