diff options
| -rw-r--r-- | meta/recipes-core/meta/external-csl-toolchain.bb | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/meta/recipes-core/meta/external-csl-toolchain.bb b/meta/recipes-core/meta/external-csl-toolchain.bb index fb553ab898..a14e95867d 100644 --- a/meta/recipes-core/meta/external-csl-toolchain.bb +++ b/meta/recipes-core/meta/external-csl-toolchain.bb | |||
| @@ -24,36 +24,40 @@ PROVIDES += "\ | |||
| 24 | virtual/linux-libc-headers \ | 24 | virtual/linux-libc-headers \ |
| 25 | " | 25 | " |
| 26 | PV = "${CSL_VER_MAIN}" | 26 | PV = "${CSL_VER_MAIN}" |
| 27 | PR = "r3" | 27 | PR = "r5" |
| 28 | 28 | ||
| 29 | #SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2" | 29 | #SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/${CSL_TARGET_SYS}/arm-${PV}-${TARGET_PREFIX}i686-pc-linux-gnu.tar.bz2" |
| 30 | 30 | ||
| 31 | SRC_URI = "file://SUPPORTED" | 31 | SRC_URI = "file://SUPPORTED" |
| 32 | 32 | ||
| 33 | do_install() { | 33 | do_install() { |
| 34 | install -d ${D}${sysconfdir} ${D}${bindir} ${D}${sbindir} ${D}${base_bindir} ${D}${libdir} | 34 | # Use optimized files if available |
| 35 | install -d ${D}${base_libdir} ${D}${base_sbindir} ${D}${datadir} ${D}/usr | 35 | sysroot="${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc" |
| 36 | 36 | if [ -d $sysroot/${CSL_TARGET_CORE} ]; then | |
| 37 | if [ -d ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE} ]; then | 37 | sysroot="$sysroot/${CSL_TARGET_CORE}" |
| 38 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/lib/. ${D}${base_libdir} | ||
| 39 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/etc/. ${D}${sysconfdir} | ||
| 40 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/sbin/. ${D}${base_sbindir} | ||
| 41 | if [ ! -e ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/include ]; then | ||
| 42 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/include ${D}/usr/ | ||
| 43 | fi | ||
| 44 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/${CSL_TARGET_CORE}/usr/. ${D}/usr/ | ||
| 45 | else | ||
| 46 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/lib/. ${D}${base_libdir} | ||
| 47 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/etc/. ${D}${sysconfdir} | ||
| 48 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/sbin/. ${D}${base_sbindir} | ||
| 49 | cp -a ${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}/libc/usr/. ${D}/usr/ | ||
| 50 | fi | 38 | fi |
| 51 | 39 | ||
| 52 | if [ -e ${D}${prefix}/info ]; then | 40 | cp -a $sysroot${base_libdir}/. ${D}${base_libdir} |
| 53 | mv ${D}${prefix}/info ${D}${infodir} | 41 | cp -a $sysroot/etc/. ${D}${sysconfdir} |
| 54 | fi | 42 | cp -a $sysroot/sbin/. ${D}${base_sbindir} |
| 55 | if [ -e ${D}${prefix}/man ]; then | 43 | |
| 56 | mv ${D}${prefix}/man ${D}${mandir} | 44 | install -d ${D}/usr |
| 45 | for usr_element in bin libexec sbin share ${base_libdir}; do | ||
| 46 | usr_path=$sysroot/usr/$usr_element | ||
| 47 | cp -a $usr_path ${D}/usr/ | ||
| 48 | done | ||
| 49 | for datadir_element in man info; do | ||
| 50 | datadir_path=$sysroot/usr/$datadir_element | ||
| 51 | if [ -e $datadir_path ]; then | ||
| 52 | cp -a $datadir_path ${D}${datadir}/ | ||
| 53 | fi | ||
| 54 | done | ||
| 55 | |||
| 56 | # Some toolchains have headers under the core specific area | ||
| 57 | if [ -e $sysroot/usr/include ]; then | ||
| 58 | cp -a $sysroot/usr/include/. ${D}${includedir} | ||
| 59 | else | ||
| 60 | cp -a $sysroot/../usr/include/. ${D}${includedir} | ||
| 57 | fi | 61 | fi |
| 58 | 62 | ||
| 59 | rm ${D}${sysconfdir}/rpc | 63 | rm ${D}${sysconfdir}/rpc |
| @@ -61,18 +65,13 @@ do_install() { | |||
| 61 | 65 | ||
| 62 | mv ${D}${libdir}/bin/* ${D}${bindir}/ | 66 | mv ${D}${libdir}/bin/* ${D}${bindir}/ |
| 63 | if [ -e ${D}${libdir}/bin/.debug ]; then | 67 | if [ -e ${D}${libdir}/bin/.debug ]; then |
| 64 | install -d ${D}${bindir}/.debug | ||
| 65 | mv ${D}${libdir}/bin/.debug/* ${D}${bindir}/.debug/ | 68 | mv ${D}${libdir}/bin/.debug/* ${D}${bindir}/.debug/ |
| 66 | fi | 69 | fi |
| 67 | ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver | 70 | ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver |
| 68 | 71 | ||
| 69 | sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h | 72 | sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h |
| 70 | sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so | 73 | sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so |
| 71 | sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so | 74 | sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so |
| 72 | } | ||
| 73 | |||
| 74 | do_install_locale_append () { | ||
| 75 | rm -r ${D}${datadir}/locale ${D}${libdir}/locale | ||
| 76 | } | 75 | } |
| 77 | 76 | ||
| 78 | SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust" | 77 | SYSROOT_PREPROCESS_FUNCS += "external_toolchain_sysroot_adjust" |
