diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-22 09:43:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-23 16:20:13 +0100 |
commit | 0dfc8aabef0fe17bf9c920c30d2ea94fd926cc9d (patch) | |
tree | 2995a07a20644b6b645af2f490f3e2ca7d0b1f18 /meta/recipes-devtools/gcc/gcc-target.inc | |
parent | deae329c3c651766fced7c2317bfcf07de068dff (diff) | |
download | poky-0dfc8aabef0fe17bf9c920c30d2ea94fd926cc9d.tar.gz |
gcc-target: Combine gcc-target-configure.inc, gcc-target-package.inc and other common code
(From OE-Core rev: 86bbe5b7b8e8f0c6ee88888fa083053ae14765c4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-target.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-target.inc | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc new file mode 100644 index 0000000000..150fbba419 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-target.inc | |||
@@ -0,0 +1,153 @@ | |||
1 | GCCMULTILIB = "--enable-multilib" | ||
2 | require gcc-configure-common.inc | ||
3 | |||
4 | EXTRA_OECONF_PATHS = " \ | ||
5 | --with-sysroot=/ \ | ||
6 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
7 | --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \ | ||
8 | --with-gxx-include-dir=${includedir}/c++/ --enable-dependency-tracking" | ||
9 | |||
10 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ " | ||
11 | |||
12 | PACKAGES = "\ | ||
13 | ${PN} ${PN}-plugins ${PN}-symlinks \ | ||
14 | g++ g++-symlinks \ | ||
15 | cpp cpp-symlinks \ | ||
16 | g77 g77-symlinks \ | ||
17 | gfortran gfortran-symlinks \ | ||
18 | gcov gcov-symlinks \ | ||
19 | ${PN}-plugin-dev \ | ||
20 | ${PN}-doc \ | ||
21 | ${PN}-dev \ | ||
22 | ${PN}-dbg \ | ||
23 | " | ||
24 | |||
25 | FILES_${PN} = "\ | ||
26 | ${bindir}/${TARGET_PREFIX}gcc* \ | ||
27 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \ | ||
28 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \ | ||
29 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \ | ||
30 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \ | ||
31 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \ | ||
32 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
33 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
34 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \ | ||
35 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
36 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
37 | " | ||
38 | INSANE_SKIP_${PN} += "dev-so" | ||
39 | |||
40 | FILES_${PN}-dbg += "\ | ||
41 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \ | ||
42 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \ | ||
43 | " | ||
44 | FILES_${PN}-dev = "\ | ||
45 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \ | ||
46 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \ | ||
47 | " | ||
48 | FILES_${PN}-plugin-dev = "\ | ||
49 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | ||
50 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \ | ||
51 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \ | ||
52 | " | ||
53 | FILES_${PN}-symlinks = "\ | ||
54 | ${bindir}/cc \ | ||
55 | ${bindir}/gcc \ | ||
56 | ${bindir}/gccbug \ | ||
57 | " | ||
58 | |||
59 | FILES_${PN}-plugins = "\ | ||
60 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \ | ||
61 | " | ||
62 | ALLOW_EMPTY_${PN}-plugins = "1" | ||
63 | |||
64 | FILES_g77 = "\ | ||
65 | ${bindir}/${TARGET_PREFIX}g77 \ | ||
66 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \ | ||
67 | " | ||
68 | FILES_g77-symlinks = "\ | ||
69 | ${bindir}/g77 \ | ||
70 | ${bindir}/f77 \ | ||
71 | " | ||
72 | FILES_gfortran = "\ | ||
73 | ${bindir}/${TARGET_PREFIX}gfortran \ | ||
74 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \ | ||
75 | " | ||
76 | FILES_gfortran-symlinks = "\ | ||
77 | ${bindir}/gfortran \ | ||
78 | ${bindir}/f95" | ||
79 | |||
80 | FILES_cpp = "\ | ||
81 | ${bindir}/${TARGET_PREFIX}cpp \ | ||
82 | ${base_libdir}/cpp \ | ||
83 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1" | ||
84 | FILES_cpp-symlinks = "${bindir}/cpp" | ||
85 | |||
86 | FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov" | ||
87 | FILES_gcov-symlinks = "${bindir}/gcov" | ||
88 | |||
89 | FILES_g++ = "\ | ||
90 | ${bindir}/${TARGET_PREFIX}g++ \ | ||
91 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \ | ||
92 | " | ||
93 | FILES_g++-symlinks = "\ | ||
94 | ${bindir}/c++ \ | ||
95 | ${bindir}/g++ \ | ||
96 | " | ||
97 | |||
98 | |||
99 | FILES_${PN}-doc = "\ | ||
100 | ${infodir} \ | ||
101 | ${mandir} \ | ||
102 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
103 | " | ||
104 | |||
105 | do_install () { | ||
106 | oe_runmake 'DESTDIR=${D}' install-host | ||
107 | |||
108 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
109 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
110 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
111 | rm -rf ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/*.la | ||
112 | rmdir ${D}${includedir} | ||
113 | |||
114 | # Hack around specs file assumptions | ||
115 | 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 | ||
116 | |||
117 | # Cleanup manpages.. | ||
118 | rm -rf ${D}${mandir}/man7 | ||
119 | |||
120 | cd ${D}${bindir} | ||
121 | |||
122 | # We care about g++ not c++ | ||
123 | rm -f *c++ | ||
124 | |||
125 | # We don't care about the gcc-<version> ones for this | ||
126 | rm -f *gcc-?.?* | ||
127 | |||
128 | # We use libiberty from binutils | ||
129 | find ${D}${libdir} -name libiberty.a | xargs rm -f | ||
130 | find ${D}${libdir} -name libiberty.h | xargs rm -f | ||
131 | |||
132 | # Not sure why we end up with these but we don't want them... | ||
133 | rm -f ${TARGET_PREFIX}${TARGET_PREFIX}* | ||
134 | |||
135 | # Symlinks so we can use these trivially on the target | ||
136 | if [ -e ${TARGET_PREFIX}g77 ]; then | ||
137 | ln -sf ${TARGET_PREFIX}g77 g77 || true | ||
138 | ln -sf g77 f77 || true | ||
139 | fi | ||
140 | if [ -e ${TARGET_PREFIX}gfortran ]; then | ||
141 | ln -sf ${TARGET_PREFIX}gfortran gfortran || true | ||
142 | ln -sf gfortran f95 || true | ||
143 | fi | ||
144 | ln -sf ${TARGET_PREFIX}g++ g++ | ||
145 | ln -sf ${TARGET_PREFIX}gcc gcc | ||
146 | ln -sf ${TARGET_PREFIX}cpp cpp | ||
147 | install -d ${D}${base_libdir} | ||
148 | ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp | ||
149 | ln -sf g++ c++ | ||
150 | ln -sf gcc cc | ||
151 | |||
152 | chown -R root:root ${D} | ||
153 | } | ||