# HG changeset patch # User Christophe Lincoln # Date 1336924751 -7200 # Node ID a20fac3c915f99601107a8e8b7524e232384b852 # Parent ad6f30bc009552540436754d7b2105e609a2a4c3 cook: we may use sysroot when cross compiling diff -r ad6f30bc0095 -r a20fac3c915f cook --- a/cook Sun May 13 17:22:50 2012 +0200 +++ b/cook Sun May 13 17:59:11 2012 +0200 @@ -433,9 +433,13 @@ case "$ARCH" in arm|x86_64) # CROSS_COMPILE is used by at least Busybox and the kernel to set - # the cross-tools prefix. - echo "cook: adding /usr/cross/$ARCH/bin to PATH" - export PATH=$PATH:/usr/cross/$ARCH/bin + # the cross-tools prefix but first check if sysroot is used. + if [ "$SYSROOT" ]; then + echo "cook: $ARCH sysroot: $SYSROOT" + else + echo "cook: adding /usr/cross/$ARCH/bin to PATH" + export PATH=$PATH:/usr/cross/$ARCH/bin + fi export CROSS_COMPILE=$HOST_SYSTEM- echo "cook: using cross-tools: $CROSS_COMPILE" export CC=${HOST_SYSTEM}-gcc @@ -444,7 +448,9 @@ export AS=${HOST_SYSTEM}-as export RANLIB=${HOST_SYSTEM}-ranlib export LD=${HOST_SYSTEM}-ld - export STRIP=${HOST_SYSTEM}-strip ;; + export STRIP=${HOST_SYSTEM}-strip + #export PKGCONFIG=${HOST_SYSTEM}-pkg-config + ;; esac [ "$QA" ] && receipt_quality diff -r ad6f30bc0095 -r a20fac3c915f cook.conf --- a/cook.conf Sun May 13 17:22:50 2012 +0200 +++ b/cook.conf Sun May 13 17:59:11 2012 +0200 @@ -27,7 +27,7 @@ WOK_URL="http://hg.slitaz.org/wok" FLAVORS_URL="http://hg.slitaz.org/flavors" -# Cooker URL for RSS feed link (http://localhost/cooker/cooker.cgi) +# Cooker URL for RSS feed link (http://localhost/cgi-bin/cooker/cooker.cgi) COOKER_URL="http://cook.slitaz.org/" # Translation files to be included in packages. @@ -43,8 +43,10 @@ BUILD_SYSTEM="$ARCH-slitaz-linux" HOST_SYSTEM="$ARCH-slitaz-linux" -# Old way/tazwok compatibility. -BUILD_HOST="$HOST_SYSTEM" +# Cross compilation settings. Cross sysroot is used by cross-tools to +# set the system. SliTaz standard is to point sysroot to the directory +# of the cross toolchain. Example: SYSROOT="/usr/$HOST_SYSTEM" +SYSROOT="" # SliTaz optimisation flags - Wide compatibility & optimized for ARCH. # @@ -84,3 +86,6 @@ # Default tank config: AUFS_MOUNTS="/ /proc /sys /dev/shm /dev/pts /var/cache/tazpkg \ /home /home/slitaz/src /home/slitaz/packages" + +# Old way/tazwok compatibility. +BUILD_HOST="$HOST_SYSTEM" diff -r ad6f30bc0095 -r a20fac3c915f cross.conf --- a/cross.conf Sun May 13 17:22:50 2012 +0200 +++ b/cross.conf Sun May 13 17:59:11 2012 +0200 @@ -10,7 +10,7 @@ PREFIX=/usr/cross/$ARCH # Sysroot settings. If sysroot is used PREFIX will be set to /usr. -# Set sysroot to point to the directory of the cross toolchain +# SliTaz set sysroot to point to the directory of the cross toolchain # Example: SYSROOT="/usr/$TARGET" SYSROOT="" diff -r ad6f30bc0095 -r a20fac3c915f doc/cross.txt --- a/doc/cross.txt Sun May 13 17:22:50 2012 +0200 +++ b/doc/cross.txt Sun May 13 17:59:11 2012 +0200 @@ -39,8 +39,8 @@ Setup the build environment and compile a cross toolchain ------------------------------------------------------------- + # cook arm-setup # cook setup - # cook arm-setup (vi/nano /etc/slitaz/cross.conf) # cross check-env --install # cross compile