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