wok-current rev 10302

Add: cross-arm-binutils and cross-arm-gcc for testing purpose (see doc:cookbook:cross)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 22 01:31:33 2011 +0200 (2011-05-22)
parents 98d98cee3cd5
children 5f31f2bade10
files cross-arm-binutils/receipt cross-arm-gcc/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cross-arm-binutils/receipt	Sun May 22 01:31:33 2011 +0200
     1.3 @@ -0,0 +1,46 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="cross-arm-binutils"
     1.7 +VERSION="2.21"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Cross compilation linker targeting ARM platform."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +SOURCE="binutils"
    1.12 +WEB_SITE="http://www.gnu.org/software/binutils/"
    1.13 +TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.14 +WGET_URL="$GNU_MIRROR/$SOURCE/$TARBALL"
    1.15 +
    1.16 +DEPENDS=""
    1.17 +BUILD_DEPENDS="slitaz-toolchain"
    1.18 +
    1.19 +# The goal here is to build an ARM cross toolchain who we let build code for
    1.20 +# the target arch from an i486 build/host. To build a cross toolchain we use
    1.21 +# the native i486 GCC compiler so set --build and --host to HOST_SYSTEM.
    1.22 +CROSS_TARGET="arm-slitaz-linux"
    1.23 +CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
    1.24 +
    1.25 +# CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
    1.26 +unset CFLAGS CXXFLAGS
    1.27 +
    1.28 +# Rules to configure and make the package.
    1.29 +compile_rules()
    1.30 +{
    1.31 +	cd $src
    1.32 +	mkdir -p ../build && cd ../build
    1.33 +	$src/configure \
    1.34 +		--program-prefix="$CROSS_TARGET-" \
    1.35 +		--disable-multilib \
    1.36 +		--disable-nls \
    1.37 +		$CROSS_TRIPLET &&
    1.38 +	make configure-host &&
    1.39 +	make tooldir=/usr &&
    1.40 +	make tooldir=/usr install
    1.41 +}
    1.42 +
    1.43 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.44 +genpkg_rules()
    1.45 +{
    1.46 +	mkdir -p $fs/usr/bin $fs/usr/lib
    1.47 +	cp -a $install/usr/bin/$CROSS_TARGET-* $fs/usr/bin
    1.48 +	cp -a $install/usr/lib/ldscripts $fs/usr/lib
    1.49 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/cross-arm-gcc/receipt	Sun May 22 01:31:33 2011 +0200
     2.3 @@ -0,0 +1,49 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="cross-arm-gcc"
     2.7 +VERSION="4.5.2"
     2.8 +CATEGORY="system-tools"
     2.9 +SHORT_DESC="Cross compiler for targeting ARM platform."
    2.10 +MAINTAINER="pankso@slitaz.org"
    2.11 +SOURCE="gcc-core"
    2.12 +WEB_SITE="http://www.gnu.org/software/binutils/"
    2.13 +TARBALL="$SOURCE-$VERSION.tar.bz2"
    2.14 +WGET_URL="$GNU_MIRROR/$SOURCE/$TARBALL"
    2.15 +
    2.16 +DEPENDS="cross-arm-binutils mpc-library"
    2.17 +BUILD_DEPENDS="slitaz-toolchain cross-arm-binutils gmp gmp-dev mpfr mpfr-dev \
    2.18 +mpc-library"
    2.19 +
    2.20 +# The goal here is to build an ARM cross toolchain who we let build code for
    2.21 +# the target arch from an i486 build/host. To build a cross toolchain we use
    2.22 +# the native i486 GCC compiler so set --build and --host to HOST_SYSTEM.
    2.23 +CROSS_TARGET="arm-slitaz-linux"
    2.24 +CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
    2.25 +
    2.26 +# Rules to configure and make the package.
    2.27 +compile_rules()
    2.28 +{
    2.29 +	cd $src
    2.30 +	mkdir -p ../build && cd ../build
    2.31 +	$src/configure \
    2.32 +		--libexecdir=/usr/lib \
    2.33 +		--disable-nls \
    2.34 +		--disable-threads \
    2.35 +		--disable-multilib \
    2.36 +		--disable-bootstarp \
    2.37 +		--enable-languages=c \
    2.38 +		--with-cpu=arm9 \
    2.39 +		$CROSS_TRIPLET &&
    2.40 +	make \
    2.41 +		AS_FOR_TARGET=$CROSS_TARGET-as \
    2.42 +		LD_FOR_TARGET=$CROSS_TARGET-ld &&
    2.43 +	make install
    2.44 +}
    2.45 +
    2.46 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.47 +genpkg_rules()
    2.48 +{
    2.49 +	mkdir -p $fs/usr
    2.50 +	cp -a $install/usr/bin $fs/usr
    2.51 +	cp -a $install/usr/lib $fs/usr
    2.52 +}