1 # Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
2 pkgname=cross-sparc64-linux-gnu-gcc
4 _target="sparc64-linux-gnu"
7 pkgdesc="The GNU Compiler Collection for the Sparc64 architecture"
8 url="http://www.gnu.org/software/binutils/"
11 depends=('mpfr>=2.3.1' 'gmp>=4.2' 'libmpc>0.8' 'sh' "cross-${_target}-binutils")
12 options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
13 source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2")
14 md5sums=('b1957f3209080b2f55bc3756d3a62b7c')
15 _sysroot="/usr/lib/cross-${_target}"
18 cd ${srcdir}/${_pkgname}-${pkgver}
21 "--prefix=${_sysroot}" \
22 "--bindir=/usr/bin" "--program-prefix=${_target}-" \
23 "--with-sysroot=${_sysroot}" \
24 "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
25 --with-gnu-as --with-gnu-ld \
26 --disable-nls --disable-threads \
27 --enable-languages=c \
28 --disable-multilib --disable-libgcj \
29 --without-headers --disable-shared
31 make all-gcc "inhibit_libc=true"
35 cd ${srcdir}/${_pkgname}-${pkgver}
37 make DESTDIR=${pkgdir} install-gcc
39 msg "Removing duplicit files..."
40 # remove these files as they are already in the system
42 rm -Rf ${pkgdir}${_sysroot}/{man,info}
43 # remove conflicting binaries
44 find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete
46 msg "Creating out-of-path executables..."
47 # symlink executables to single directory with no-arch-prefix name
48 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
49 cd ${pkgdir}/usr/bin/cross/${_target}/;
50 for bin in ${pkgdir}/usr/bin/${_target}-*; do
51 bbin=`basename "$bin"`;
52 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;