summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-29 12:21:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-29 12:36:37 +0000
commitad0baa7d2f33a865011e0c6afe29f22aa1beea32 (patch)
tree2f6b9ad2436078a3bcb1660b6ed6d6a577895949 /meta
parent1052e24d72e6a77af3f3073a34dfc5a522d49616 (diff)
downloadopenembedded-core-ad0baa7d2f33a865011e0c6afe29f22aa1beea32.tar.gz
openembedded-core-ad0baa7d2f33a865011e0c6afe29f22aa1beea32.tar.bz2
openembedded-core-ad0baa7d2f33a865011e0c6afe29f22aa1beea32.zip
eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
If the sstate files are installed into a sysroot from the sstate cache, the directory to the main sysroot can change and the symlinks aren't adjusted to account for this. This is a problem specific to the toolchain bootstrap process. This patch adds up a function to recreate the symlinks, hence ensuring they always point at the correct location. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/eglibc/eglibc-initial.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
index 448f73a971..906251633b 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -60,4 +60,16 @@ do_siteconfig () {
:
}
+SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst"
+eglibcinitial_sstate_postinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ # Recreate the symlinks to ensure they point to the correct location
+ for t in linux asm asm-generic; do
+ rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t
+ ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/
+ done
+ fi
+}
+
do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}"