diff options
| -rw-r--r-- | meta/packages/meta/meta-toolchain.bb | 23 |
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() { | |||
| 93 | done | 93 | done |
| 94 | done | 94 | done |
| 95 | 95 | ||
| 96 | # remove unwanted executables | 96 | # Remove unwanted executables |
| 97 | rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc | 97 | rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc |
| 98 | 98 | ||
| 99 | # remove broken .la files | 99 | # Remove broken .la files |
| 100 | rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la | 100 | rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la |
| 101 | 101 | ||
| 102 | # Generate link for sysroot use | ||
| 102 | # /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> . | 103 | # /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> . |
| 103 | cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} | 104 | cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} |
| 104 | ln -sf . usr | 105 | ln -sf . usr |
| 105 | 106 | ||
| 106 | mkdir -p ${SDK_DEPLOY} | 107 | # Setup site file for external use |
| 108 | siteconfig=${SDK_OUTPUT}/${prefix}/site-config | ||
| 109 | touch $siteconfig | ||
| 110 | for sitefile in ${CONFIG_SITE} ; do | ||
| 111 | cat $sitefile >> $siteconfig | ||
| 112 | done | ||
| 113 | |||
| 114 | # Create environment setup script | ||
| 115 | script=${SDK_OUTPUT}/${prefix}/environment-setup | ||
| 116 | touch $script | ||
| 117 | echo 'export PATH=${prefix}/bin:$PATH' >> $script | ||
| 118 | echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script | ||
| 119 | echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script | ||
| 120 | echo 'export CONFIG_SITE=${prefix}/site-config' >> $script | ||
| 121 | |||
| 122 | # Package it up | ||
| 123 | mkdir -p ${SDK_DEPLOY} | ||
| 107 | cd ${SDK_OUTPUT} | 124 | cd ${SDK_OUTPUT} |
| 108 | fakeroot tar cfj ${SDK_DEPLOY}/${SDK_NAME}-toolchain-${DISTRO_VERSION}.tar.bz2 . | 125 | fakeroot tar cfj ${SDK_DEPLOY}/${SDK_NAME}-toolchain-${DISTRO_VERSION}.tar.bz2 . |
| 109 | } | 126 | } |
