blob: b285b2e8bef7e19255e793518342309cfbd2005b [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "The klcc crosscompiler for klibc"
2
3require klibc.inc
4DEPENDS = "klibc"
5
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006# no packaging for this crossscript
7PACKAGES = ""
8inherit nopackages
9
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
11
12SRC_URI += "file://use-env-for-perl.patch"
13
14# disable task already run in klibc recipe
15do_configure[noexec] = "1"
16
17do_compile() {
18 oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc
19}
20
21do_install() {
22 install -d ${D}${bindir_crossscripts}/
23 install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024 # 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 Williamsb48b7b42016-08-17 15:04:38 -050031}
32
Brad Bishop6e60e8b2018-02-01 10:27:11 -050033SYSROOT_DIRS += "${bindir_crossscripts}"
34SSTATE_SCAN_FILES += "*-klcc"