1 INHIBIT_PACKAGE_STRIP ?= ""
2 OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
3 INHIBIT_PACKAGE_STRIP = "1"
5 PACKAGES = "libgcc libssp libstdc++ libg2c libgfortran"
7 # Called from within gcc-cross, so libdir is set wrong
8 FILES_libg2c = "${target_libdir}/libg2c.so.*"
10 FILES_libssp = "${target_libdir}/libssp.so.*"
12 FILES_libgfortran = "${target_libdir}/libgfortran.so.*"
14 FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1"
16 FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
19 oe_runmake 'DESTDIR=${D}' install
21 # Move libgcc_s into /lib
22 mkdir -p ${D}${target_base_libdir}
23 if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then
24 # Already in the right location
26 elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then
27 mv -f ${D}${prefix}/lib/libgcc_s.so* ${D}${target_base_libdir} || true
29 elif [ -f ${D}${prefix}/*/lib/nof/libgcc_s.so.? ]; then
30 mv -f ${D}${prefix}/*/lib/nof/libgcc_s.so* ${D}${target_base_libdir}
32 # Look for .../${TARGET_SYS}/lib/libgcc_s*
33 # (or /lib64/, on x86_64)
34 mv -f ${D}${prefix}/*/${target_base_libdir}/libgcc_s.so* ${D}${target_base_libdir} || true
39 # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
40 mkdir -p ${D}${target_libdir}
42 if [ -f ${D}${prefix}/*/lib/nof/libstdc++.so ]; then
44 mv -f ${D}${prefix}/*/lib/nof/libstdc++.so* ${D}${target_libdir} || true
45 mv -f ${D}${prefix}/*/lib/nof/libg2c.so* ${D}${target_libdir} || true
46 mv -f ${D}${prefix}/*/lib/nof/libgfortran*.so* ${D}${target_libdir} || true
47 mv -f ${D}${prefix}/*/lib/nof/libssp*.so* ${D}${target_libdir} || true
50 # Look for .../${TARGET_SYS}/lib/lib* (or /lib64/ on x86_64)
51 mv -f ${D}${prefix}/*/${target_base_libdir}/libstdc++.so* ${D}${target_libdir} || true
52 mv -f ${D}${prefix}/*/${target_base_libdir}/libg2c.so* ${D}${target_libdir} || true
53 mv -f ${D}${prefix}/*/${target_base_libdir}/libgfortran*.so* ${D}${target_libdir} || true
54 mv -f ${D}${prefix}/*/${target_base_libdir}/libssp*.so* ${D}${target_libdir} || true
59 # Manually run the target stripper since we won't get it run by
61 if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
62 ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true
63 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
64 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
65 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
68 # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
69 # gfortran is fully backwards compatible. This is a safe and practical solution.
70 if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
73 ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
74 cd ${CROSS_DIR}/${TARGET_SYS}/bin/
75 ln -sf gfortran g77 || true