diff options
Diffstat (limited to 'meta/packages/gcc/gcc-package-cross-no-fortran.inc')
-rw-r--r-- | meta/packages/gcc/gcc-package-cross-no-fortran.inc | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-package-cross-no-fortran.inc b/meta/packages/gcc/gcc-package-cross-no-fortran.inc new file mode 100644 index 0000000000..3548c0bb8e --- /dev/null +++ b/meta/packages/gcc/gcc-package-cross-no-fortran.inc | |||
@@ -0,0 +1,66 @@ | |||
1 | # Packages emitted by our gcc-cross builds. | ||
2 | # | ||
3 | INHIBIT_PACKAGE_STRIP ?= "" | ||
4 | HAS_G2C ?= "yes" | ||
5 | OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}" | ||
6 | INHIBIT_PACKAGE_STRIP = "1" | ||
7 | |||
8 | PACKAGES = "libgcc libstdc++ libg2c libg2c-dev" | ||
9 | |||
10 | PACKAGE_ARCH_libg2c = "${TARGET_ARCH}" | ||
11 | PACKAGE_ARCH_libg2c-dev = "${TARGET_ARCH}" | ||
12 | |||
13 | # Called from within gcc-cross, so libdir is set wrong | ||
14 | FILES_libg2c = "${target_libdir}/libg2c.so.*" | ||
15 | FILES_libg2c-dev = "${target_libdir}/libg2c.so \ | ||
16 | ${target_libdir}/libg2c.a \ | ||
17 | ${target_libdir}/libfrtbegin.a" | ||
18 | |||
19 | PACKAGE_ARCH_libgcc = "${TARGET_ARCH}" | ||
20 | FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1" | ||
21 | |||
22 | PACKAGE_ARCH_libstdc++ = "${TARGET_ARCH}" | ||
23 | PACKAGE_ARCH_libstdc++-dev = "${TARGET_ARCH}" | ||
24 | FILES_libstdc++ = "${target_libdir}/libstdc++.so.*" | ||
25 | FILES_libstdc++-dev = "${target_includedir}/c++/${PV} \ | ||
26 | ${target_libdir}/libstdc++.so \ | ||
27 | ${target_libdir}/libstdc++.la \ | ||
28 | ${target_libdir}/libstdc++.a \ | ||
29 | ${target_libdir}/libsupc++.la \ | ||
30 | ${target_libdir}/libsupc++.a" | ||
31 | |||
32 | python do_package() { | ||
33 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | ||
34 | bb.data.setVar('PKG_libgcc', 'libgcc1', d) | ||
35 | bb.build.exec_func('package_do_package', d) | ||
36 | } | ||
37 | |||
38 | do_install () { | ||
39 | oe_runmake 'DESTDIR=${D}' install | ||
40 | |||
41 | # Move libgcc_s into /lib | ||
42 | mkdir -p ${D}${target_base_libdir} | ||
43 | if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then | ||
44 | # Already in the right location | ||
45 | : | ||
46 | elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then | ||
47 | mv -f ${D}${prefix}/lib/libgcc_s.so.* ${D}${target_base_libdir} | ||
48 | else | ||
49 | mv -f ${D}${prefix}/*/lib/libgcc_s.so.* ${D}${target_base_libdir} | ||
50 | fi | ||
51 | |||
52 | # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr | ||
53 | mkdir -p ${D}${target_libdir} | ||
54 | mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${target_libdir} | ||
55 | if [ "${HAS_G2C}" = "yes" ]; then | ||
56 | mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${target_libdir} | ||
57 | fi | ||
58 | |||
59 | # Manually run the target stripper since we won't get it run by | ||
60 | # the packaging. | ||
61 | if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then | ||
62 | ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* | ||
63 | ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* | ||
64 | ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* | ||
65 | fi | ||
66 | } | ||