diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2014-05-03 18:09:49 +0200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-05-04 11:41:12 +0100 |
commit | 55b09e522ca88c0c0b2dd7a36e4861a1cf6ca9c6 (patch) | |
tree | ec217387dbc24834361522bc088009c28be6e015 /meta-initramfs | |
parent | 7e2c29fca8ab46ef1eee841eeccc36cdf76222a2 (diff) | |
download | meta-openembedded-55b09e522ca88c0c0b2dd7a36e4861a1cf6ca9c6.tar.gz |
klcc_cross: move in target sysroot as crossscript
Klcc-cross is properly a crosscript so avoid to inherit cross.bbclass and stage
it in target sysroot under usr/bin/crossscripts.
Minor adjustment is necessary for INSTALLDIR.
Finally some magic mangling is applied fixing the paths of sstate so that it is
invalidated in case of subsequent builds targeting machines with the same
arch and in case of builds sharing the sstate cache.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'meta-initramfs')
-rw-r--r-- | meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb index 7ff9c2e1a..2f4afce06 100644 --- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb | |||
@@ -7,28 +7,34 @@ FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" | |||
7 | 7 | ||
8 | SRC_URI += "file://use-env-for-perl.patch" | 8 | SRC_URI += "file://use-env-for-perl.patch" |
9 | 9 | ||
10 | inherit cross | ||
11 | |||
12 | # disable task already run in klibc recipe | 10 | # disable task already run in klibc recipe |
13 | do_configure[noexec] = "1" | 11 | do_configure[noexec] = "1" |
12 | |||
14 | do_compile() { | 13 | do_compile() { |
15 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc | 14 | oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc |
16 | } | 15 | } |
17 | # The linux-libc-headers and klibc custom headers are not machine-specific | 16 | |
18 | # but are installed into machine sysroot. | ||
19 | # Klcc wrapper is hardcoding some of these paths thus, to keep the recipe | ||
20 | # arch-specific, we force the rebuild of klcc-cross for each machine. | ||
21 | do_compile[vardeps] += "MACHINE" | ||
22 | do_install() { | 17 | do_install() { |
23 | install -d ${D}${bindir} | 18 | install -d ${D}${bindir_crossscripts}/ |
24 | install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc | 19 | install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc |
20 | # Insert an unencoded path as a comment to trigger the sstate renaming functions | ||
21 | sed -i '2i #${STAGING_DIR_TARGET}' ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc | ||
22 | } | ||
23 | |||
24 | SYSROOT_PREPROCESS_FUNCS += "klcc_sysroot_preprocess" | ||
25 | |||
26 | klcc_sysroot_preprocess () { | ||
27 | sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} | ||
25 | } | 28 | } |
26 | 29 | ||
30 | deltask do_package | ||
31 | deltask do_packagedata | ||
32 | deltask do_package_write_ipk | ||
33 | deltask do_package_write_rpm | ||
34 | deltask do_package_write_deb | ||
35 | deltask do_package_write_tar | ||
27 | 36 | ||
28 | # disable unneeded tasks | 37 | SSTATE_SCAN_FILES = "*" |
29 | do_package[noexec] = "1" | 38 | EXTRA_STAGING_FIXMES = "MANGLEDSTAGINGDIRTARGET MANGLEDSTAGINGDIR" |
30 | do_packagedata[noexec] = "1" | 39 | MANGLEDSTAGINGDIR = "${@d.getVar("STAGING_DIR", True).replace("/", "\\\\/").replace("-", "\\\\-")}" |
31 | do_package_write_ipk[noexec] = "1" | 40 | MANGLEDSTAGINGDIRTARGET = "${@d.getVar("STAGING_DIR_TARGET", True).replace("/", "\\\\/").replace("-", "\\\\-")}" |
32 | do_package_write_rpm[noexec] = "1" | ||
33 | do_package_write_deb[noexec] = "1" | ||
34 | do_package_write_tar[noexec] = "1" | ||