1 # Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
2 pkgname=cross-ppc32-gcc
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' "cross-ppc32-binutils" '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 --enable-shared --enable-threads=posix \
29 --enable-languages=c,c++ \
30 --with-system-zlib --enable-__cxa_atexit \
31 --disable-libunwind-exceptions --enable-clocale=gnu \
32 --enable-gnu-unique-object --enable-linker-build-id \
33 --with-ppl --enable-cloog-backend=isl \
34 --enable-lto --enable-gold --enable-ld=default \
35 --enable-plugin --with-plugin-ld=ld.gold \
36 --disable-multilib --disable-libssp --disable-libstdcxx-pch \
37 --enable-checking=release
38 make all-gcc "inhibit_libc=true" || return 1
41 cd ${srcdir}/${_pkgname}-${pkgver}
42 make DESTDIR=${pkgdir} install-gcc || return 1
44 msg "Removing duplicit files..."
45 # remove these files as they are already in the system
47 rm -Rf ${pkgdir}/usr/share/{locale,man,info}
48 # remove conflicting binaries
49 find ${pkgdir}/usr/bin/ -type f -not -name 'powerpc-unknown-linux-gnu-*' -delete
51 msg "Creating out-of-path executables..."
52 # symlink executables to single directory with no-arch-prefix name
53 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
54 cd ${pkgdir}/usr/bin/cross/${_target}/;
55 for bin in ${pkgdir}/usr/bin/${_target}-*; do
56 bbin=`basename "$bin"`;
57 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
61 md5sums=('780f614ab18c7a9066dec6387d7490b2'
62 '87ecd60431e41096419dd8a10f76e46b')