cookutils rev 184

cook.conf handle --build and --host so we can cross compile SliTaz
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 20 01:37:23 2011 +0200 (2011-05-20)
parents bf1805b774e8
children 28d2b66fcdd5
files cook.conf
line diff
     1.1 --- a/cook.conf	Thu May 19 15:34:43 2011 +0200
     1.2 +++ b/cook.conf	Fri May 20 01:37:23 2011 +0200
     1.3 @@ -26,26 +26,29 @@
     1.4  # Translation files to be included in packages.
     1.5  LOCALE=""
     1.6  
     1.7 -# Architecture.
     1.8 +# Target host architecture type (Glibc dont build on i686 for i386).
     1.9  ARCH="i486"
    1.10  
    1.11 -# Build host.
    1.12 -BUILD_HOST="$ARCH-pc-linux-gnu"
    1.13 +# Build and host. These options are for cross-compiling. If you specify
    1.14 +# both options and BUILD_SYSTEM is different from HOST_SYSTEM, configure
    1.15 +# will prepare to cross-compile from BUILD_SYSTEM to be used on HOST_SYSTEM.
    1.16 +BUILD_SYSTEM="$(uname -m)-pc-linux-gnu"
    1.17 +HOST_SYSTEM="$ARCH-pc-linux-gnu"
    1.18  
    1.19 -# SliTaz optimisation flags - Wide compatibility & optimized for i386
    1.20 +# SliTaz optimisation flags - Wide compatibility & optimized for ARCH.
    1.21  # With -O2: binutils: Produce 14.0M Packed 5.5M Compressed 1.2M
    1.22  # With -Os: binutils: Produce 13.4M Packed 4.9M Compressed 1.1M
    1.23  MAKEFLAGS="-j$(($(grep processor /proc/cpuinfo | wc -l)+1))"
    1.24  CFLAGS="-mtune=$ARCH -Os -pipe -fomit-frame-pointer"
    1.25  CXXFLAGS="$CFLAGS"
    1.26  
    1.27 -# Default tool prefix.
    1.28 -TOOLPREFIX="${BUILD_HOST}-"
    1.29 +# Default tool prefix for Binutils.
    1.30 +TOOLPREFIX="${HOST_SYSTEM}-"
    1.31  
    1.32  # Default arguments for GNU configure. CONFIGURE_ARGS is neede for some
    1.33 -# packages since --build and --host is not well set by cook.site.
    1.34 +# packages since --build and --host is not set at all by cook.site (bug ?).
    1.35  CONFIG_SITE=/etc/slitaz/cook.site
    1.36 -CONFIGURE_ARGS="--build=$BUILD_HOST --host=$BUILD_HOST"
    1.37 +CONFIGURE_ARGS="--build=$BUILD_SYSTEM --host=$HOST_SYSTEM"
    1.38  
    1.39  # Mirrors URLs. To download sources near your location.
    1.40  GNU_MIRROR="ftp://sunsite.cnlab-switch.ch/mirror/gnu"