1 # Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
4 _target="powerpc-unknown-linux-gnu"
7 pkgdesc="The GNU Compiler Collection for the PowerPC (32 bit) architecture"
8 url="http://www.gnu.org/software/binutils/"
11 depends=('mpfr' 'gmp' 'libmpc' 'sh' "crossbinutils-ppc32" 'cloog-ppl')
12 options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
13 source=(ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-{core,g++}-${pkgver}.tar.bz2)
14 _sysroot="/usr/lib/cross-${_target}"
17 cd ${srcdir}/${_pkgname}-${pkgver}
19 #"--with-sysroot=${_sysroot}" \
20 #"--prefix=${_sysroot}" \
23 "--bindir=/usr/bin" "--program-prefix=${_target}-" \
24 "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
25 --with-libs --with-headers \
26 --with-as=/usr/bin/${_target}-as --with-ld=/usr/bin/${_target}-ld \
27 --with-ar=/usr/bin/${_target}-ar --with-ranlib=/usr/bin/${_target}-ranlib \
28 --disable-nls --disable-threads \
29 --enable-languages=c,c++ --disable-libgcj \
30 --enable-shared --enable-threads=posix \
31 --enable-lto --enable-gnu-unique-object \
32 --disable-libstdcxx-pch \
33 --with-system-zlib --with-ppl --with-cloog \
36 make all-gcc "inhibit_libc=true" || return 1
39 cd ${srcdir}/${_pkgname}-${pkgver}
40 make DESTDIR=${pkgdir} install-gcc || return 1
42 msg "Removing duplicit files..."
43 # remove these files as they are already in the system
45 rm -Rf ${pkgdir}/usr/share/{man,info}
46 # remove conflicting binaries
47 find ${pkgdir}/usr/bin/ -type f -not -name 'powerpc-unknown-linux-gnu-*' -delete
49 msg "Creating out-of-path executables..."
50 # symlink executables to single directory with no-arch-prefix name
51 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
52 cd ${pkgdir}/usr/bin/cross/${_target}/;
53 for bin in ${pkgdir}/usr/bin/${_target}-*; do
54 bbin=`basename "$bin"`;
55 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
59 md5sums=('aa9e36bec080452372bfba793428ee82'
60 '9821f1c61e43755866861485ff364e90')