From 71824019fbc2ae9fbee8c6cb6241b16e5038effa Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 29 Nov 2011 12:21:07 +0000 Subject: [PATCH] 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. (From OE-Core rev: ad0baa7d2f33a865011e0c6afe29f22aa1beea32) (From OE-Core rev: bc8a384c49c60feab9d01f8277e92ac0603c8f93) Signed-off-by: Richard Purdie --- meta/recipes-core/eglibc/eglibc-initial.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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}"