Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "The klcc crosscompiler for klibc" |
| 2 | |
| 3 | require klibc.inc |
| 4 | DEPENDS = "klibc" |
| 5 | |
| 6 | # no packaging for this crossscript |
| 7 | PACKAGES = "" |
| 8 | inherit nopackages |
| 9 | |
| 10 | SRC_URI += "file://use-env-for-perl.patch" |
| 11 | |
| 12 | # disable task already run in klibc recipe |
| 13 | do_configure[noexec] = "1" |
| 14 | |
| 15 | do_compile() { |
| 16 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc |
| 17 | } |
| 18 | |
| 19 | do_install() { |
| 20 | install -d ${D}${bindir_crossscripts}/ |
| 21 | install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc |
| 22 | # Turn the horribly encoded paths into something which sstate can transform using its ususal |
| 23 | # magic by removing all the crazy escaping. |
| 24 | sed -i -e "2i \$TARGETSYSROOT = '${STAGING_DIR_TARGET}';" \ |
| 25 | -e "2i \$NATIVESYSROOT = '${STAGING_DIR_NATIVE}';" \ |
| 26 | -e 's#${@d.getVar("STAGING_DIR_NATIVE").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${NATIVESYSROOT}#g;' \ |
| 27 | -e 's#${@d.getVar("STAGING_DIR_TARGET").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${TARGETSYSROOT}#g' \ |
| 28 | ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc |
| 29 | } |
| 30 | |
| 31 | SYSROOT_DIRS += "${bindir_crossscripts}" |
| 32 | SSTATE_SCAN_FILES += "*-klcc" |