cookutils rev 405
cook: we may use sysroot when cross compiling
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 13 17:59:11 2012 +0200 (2012-05-13) |
parents | ad6f30bc0095 |
children | 87184c2407ee |
files | cook cook.conf cross.conf doc/cross.txt |
line diff
1.1 --- a/cook Sun May 13 17:22:50 2012 +0200 1.2 +++ b/cook Sun May 13 17:59:11 2012 +0200 1.3 @@ -433,9 +433,13 @@ 1.4 case "$ARCH" in 1.5 arm|x86_64) 1.6 # CROSS_COMPILE is used by at least Busybox and the kernel to set 1.7 - # the cross-tools prefix. 1.8 - echo "cook: adding /usr/cross/$ARCH/bin to PATH" 1.9 - export PATH=$PATH:/usr/cross/$ARCH/bin 1.10 + # the cross-tools prefix but first check if sysroot is used. 1.11 + if [ "$SYSROOT" ]; then 1.12 + echo "cook: $ARCH sysroot: $SYSROOT" 1.13 + else 1.14 + echo "cook: adding /usr/cross/$ARCH/bin to PATH" 1.15 + export PATH=$PATH:/usr/cross/$ARCH/bin 1.16 + fi 1.17 export CROSS_COMPILE=$HOST_SYSTEM- 1.18 echo "cook: using cross-tools: $CROSS_COMPILE" 1.19 export CC=${HOST_SYSTEM}-gcc 1.20 @@ -444,7 +448,9 @@ 1.21 export AS=${HOST_SYSTEM}-as 1.22 export RANLIB=${HOST_SYSTEM}-ranlib 1.23 export LD=${HOST_SYSTEM}-ld 1.24 - export STRIP=${HOST_SYSTEM}-strip ;; 1.25 + export STRIP=${HOST_SYSTEM}-strip 1.26 + #export PKGCONFIG=${HOST_SYSTEM}-pkg-config 1.27 + ;; 1.28 esac 1.29 1.30 [ "$QA" ] && receipt_quality
2.1 --- a/cook.conf Sun May 13 17:22:50 2012 +0200 2.2 +++ b/cook.conf Sun May 13 17:59:11 2012 +0200 2.3 @@ -27,7 +27,7 @@ 2.4 WOK_URL="http://hg.slitaz.org/wok" 2.5 FLAVORS_URL="http://hg.slitaz.org/flavors" 2.6 2.7 -# Cooker URL for RSS feed link (http://localhost/cooker/cooker.cgi) 2.8 +# Cooker URL for RSS feed link (http://localhost/cgi-bin/cooker/cooker.cgi) 2.9 COOKER_URL="http://cook.slitaz.org/" 2.10 2.11 # Translation files to be included in packages. 2.12 @@ -43,8 +43,10 @@ 2.13 BUILD_SYSTEM="$ARCH-slitaz-linux" 2.14 HOST_SYSTEM="$ARCH-slitaz-linux" 2.15 2.16 -# Old way/tazwok compatibility. 2.17 -BUILD_HOST="$HOST_SYSTEM" 2.18 +# Cross compilation settings. Cross sysroot is used by cross-tools to 2.19 +# set the system. SliTaz standard is to point sysroot to the directory 2.20 +# of the cross toolchain. Example: SYSROOT="/usr/$HOST_SYSTEM" 2.21 +SYSROOT="" 2.22 2.23 # SliTaz optimisation flags - Wide compatibility & optimized for ARCH. 2.24 # 2.25 @@ -84,3 +86,6 @@ 2.26 # Default tank config: 2.27 AUFS_MOUNTS="/ /proc /sys /dev/shm /dev/pts /var/cache/tazpkg \ 2.28 /home /home/slitaz/src /home/slitaz/packages" 2.29 + 2.30 +# Old way/tazwok compatibility. 2.31 +BUILD_HOST="$HOST_SYSTEM"
3.1 --- a/cross.conf Sun May 13 17:22:50 2012 +0200 3.2 +++ b/cross.conf Sun May 13 17:59:11 2012 +0200 3.3 @@ -10,7 +10,7 @@ 3.4 PREFIX=/usr/cross/$ARCH 3.5 3.6 # Sysroot settings. If sysroot is used PREFIX will be set to /usr. 3.7 -# Set sysroot to point to the directory of the cross toolchain 3.8 +# SliTaz set sysroot to point to the directory of the cross toolchain 3.9 # Example: SYSROOT="/usr/$TARGET" 3.10 SYSROOT="" 3.11
4.1 --- a/doc/cross.txt Sun May 13 17:22:50 2012 +0200 4.2 +++ b/doc/cross.txt Sun May 13 17:59:11 2012 +0200 4.3 @@ -39,8 +39,8 @@ 4.4 4.5 Setup the build environment and compile a cross toolchain 4.6 ------------------------------------------------------------- 4.7 + # cook arm-setup 4.8 # cook setup 4.9 - # cook arm-setup 4.10 (vi/nano /etc/slitaz/cross.conf) 4.11 # cross check-env --install 4.12 # cross compile