wok-undigest view cross-arm-gcc/receipt @ rev 998
Add python-pyliblzma python-pycryptopp
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Apr 21 17:10:39 2013 +0200 (2013-04-21) |
parents | 4e4ce06eacc0 |
children | 1ef621db1c6d |
line source
1 # SliTaz package receipt.
3 PACKAGE="cross-arm-gcc"
4 VERSION="4.6.3"
5 CATEGORY="system-tools"
6 SHORT_DESC="Cross compiler for targeting ARM platform."
7 MAINTAINER="pankso@slitaz.org"
8 SOURCE="gcc"
9 WEB_SITE="http://gcc.gnu.org/"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WGET_URL="$GNU_MIRROR/gcc/gcc-$VERSION/$TARBALL"
13 DEPENDS="mpc-library elfutils linux-arm-api-headers cross-arm-binutils"
14 BUILD_DEPENDS="linux-arm-api-headers cross-arm-binutils gmp gmp-dev \
15 mpfr mpfr-dev mpc-library elfutils-dev glibc-dev"
17 # Cross toolchain variables.
18 CROSS_TARGET="arm-slitaz-linux-gnueabi"
19 CROSS_PREFIX="/usr/cross/arm"
20 CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
22 # CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
23 unset CFLAGS CXXFLAGS CONFIG_SITE
25 # Path to cross tools
26 export PATH=$PATH:$CROSS_PREFIX/bin
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 cd $src
33 # Package cross-arm-toolchain use 'cook --options' when rebuilding
34 # the full SliTaz ARM cross toolchain.
35 [ "$2" == "--first-pass" ] && opt=$2
36 [ "$3" == "--first-pass" ] && opt=$3
38 # Use libiberty.a from binutils.
39 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
41 mkdir -p ../build && cd ../build
43 case $opt in
44 --first-pass)
45 # Used by cross-arm-toolchain when rebuilding the full toolchain.
46 echo "cook: configure GCC for: cross toolchain first pass"
47 $src/configure \
48 --prefix=$CROSS_PREFIX \
49 --libexec=$CROSS_PREFIX/lib \
50 --disable-shared \
51 --enable-languages=c \
52 --disable-threads \
53 --disable-multilib \
54 --disable-nls \
55 --without-headers \
56 --disable-libgomp \
57 --disable-libmudflap \
58 --disable-libssp \
59 $CROSS_TRIPLET &&
60 make all-gcc all-target-libgcc &&
61 make install-gcc install-target-libgcc &&
62 cd ${install}${CROSS_PREFIX}/lib/gcc/$CROSS_TARGET/$VERSION &&
63 ln -s libgcc.a libgcc_eh.a ;;
64 *)
65 # Used to produce a full featured ARM GCC cross compiler.
66 echo "cook: configure GCC for: final/full cross compiler"
68 # We cant't have cross-arm-glibc it in DEPENDS since it not build
69 # when we compile GCC --first-pass
70 if [ ! "/var/lib/tazpkg/installed/cross-arm-glibc" ]; then
71 tazpkg -i /home/slitaz/packages/cross-arm-glibc-2.14.1.tazpkg
72 fi
74 $src/configure \
75 --prefix=$CROSS_PREFIX \
76 --libexec=$CROSS_PREFIX/lib \
77 --enable-shared \
78 --enable-languages=c,c++ \
79 --enable-c99 \
80 --enable-long-long \
81 --enable-__cxa_atexit \
82 --enable-threads=posix \
83 --with-pkgversion="SliTaz" \
84 $CROSS_TRIPLET &&
85 make && make install &&
86 make all-target-libgcc &&
87 make install-target-libgcc ;;
88 esac
90 # Some configure options we could use
91 #--enable-multilib
92 #--enable-addons
93 #--with-newlib
94 }
96 # Rules to gen a SliTaz package suitable for Tazpkg.
97 genpkg_rules()
98 {
99 mkdir -p $fs/usr
100 cp -a $install/usr/cross $fs/usr
101 rm -rf ${fs}${CROSS_PREFIX}/share
103 # This will fix GCC final build since we dont use --with-sysroot=
104 # Without that we go errors such as: cannot find crtn.o
105 cd ${fs}${CROSS_PREFIX}/$CROSS_TARGET
106 for dir in lib include; do
107 mv -f $dir/* ../$dir 2>/dev/null
108 rmdir $dir 2>/dev/null
109 ln -s ../$dir .
110 done
111 }