blob: 4011aa231e8b7a05e9b13aa7f2e39f485943ab03 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "The klcc crosscompiler for klibc"
2
3require klibc.inc
4DEPENDS = "klibc"
5
6# no packaging for this crossscript
7PACKAGES = ""
8inherit nopackages
9
10SRC_URI += "file://use-env-for-perl.patch"
11
12# disable task already run in klibc recipe
13do_configure[noexec] = "1"
14
15do_compile() {
16 oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc
17}
18
19do_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
31SYSROOT_DIRS += "${bindir_crossscripts}"
32SSTATE_SCAN_FILES += "*-klcc"