From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1RVMrg-0001GK-27 for openembedded-core@lists.openembedded.org; Tue, 29 Nov 2011 13:32:48 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id pATCQ6p5012737; Tue, 29 Nov 2011 12:26:06 GMT Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12383-04; Tue, 29 Nov 2011 12:26:01 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id pATCPugo012731 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Nov 2011 12:25:57 GMT Message-ID: <1322569564.3166.1.camel@ted> From: Richard Purdie To: McClintock Matthew-B29882 , Patches and discussions about the oe-core layer Date: Tue, 29 Nov 2011 12:26:04 +0000 In-Reply-To: References: <1322521031-26849-1-git-send-email-msm@freescale.com> X-Mailer: Evolution 3.2.1- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 12:32:48 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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 --- diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc index 448f73a..9062516 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}"