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