summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-12-19 18:28:49 +0000
committerRichard Purdie <richard@openedhand.com>2007-12-19 18:28:49 +0000
commit1011c2b7e9ef1795bee77f88cc32ead943ff1cff (patch)
treee5faf4617b3573e12a9e79ee7d0027ccca82aaaa
parent02464392d3e8fcc6f1de562e3744b61b13ef5b25 (diff)
downloadopenembedded-core-1011c2b7e9ef1795bee77f88cc32ead943ff1cff.tar.gz
openembedded-core-1011c2b7e9ef1795bee77f88cc32ead943ff1cff.tar.bz2
openembedded-core-1011c2b7e9ef1795bee77f88cc32ead943ff1cff.zip
meta-toolchain: Generate site config files and an environmental setup script
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3365 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/meta/meta-toolchain.bb23
1 files changed, 20 insertions, 3 deletions
diff --git a/meta/packages/meta/meta-toolchain.bb b/meta/packages/meta/meta-toolchain.bb
index ab35204c6a..bf098a4ef1 100644
--- a/meta/packages/meta/meta-toolchain.bb
+++ b/meta/packages/meta/meta-toolchain.bb
@@ -93,17 +93,34 @@ do_populate_sdk() {
done
done
- # remove unwanted executables
+ # Remove unwanted executables
rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc
- # remove broken .la files
+ # Remove broken .la files
rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
+ # Generate link for sysroot use
# /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> .
cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
ln -sf . usr
- mkdir -p ${SDK_DEPLOY}
+ # Setup site file for external use
+ siteconfig=${SDK_OUTPUT}/${prefix}/site-config
+ touch $siteconfig
+ for sitefile in ${CONFIG_SITE} ; do
+ cat $sitefile >> $siteconfig
+ done
+
+ # Create environment setup script
+ script=${SDK_OUTPUT}/${prefix}/environment-setup
+ touch $script
+ echo 'export PATH=${prefix}/bin:$PATH' >> $script
+ echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script
+ echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script
+ echo 'export CONFIG_SITE=${prefix}/site-config' >> $script
+
+ # Package it up
+ mkdir -p ${SDK_DEPLOY}
cd ${SDK_OUTPUT}
fakeroot tar cfj ${SDK_DEPLOY}/${SDK_NAME}-toolchain-${DISTRO_VERSION}.tar.bz2 .
}