1 # Contributor: Peter B <peterbjorgensen at gmail>
2 # PKGBUILD based on cross-mipsel-linux-gnu-gcc
3 # (made by: Vojtech Horky <vojta . horky at-symbol seznam . cz>)
4 pkgname=cross-m68k-elf-gcc
9 pkgdesc="The GNU Compiler Collection for the Motorola M68000 architecture"
10 url="http://www.gnu.org/software/binutils/"
11 arch=('i686' 'x86_64')
13 depends=('mpfr' 'sh' "cross-m68k-elf-binutils" 'cloog' 'ppl')
14 options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
15 source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2")
16 md5sums=('b1957f3209080b2f55bc3756d3a62b7c')
17 _sysroot="/usr/lib/cross-${_target}"
20 cd ${srcdir}/${_pkgname}-${pkgver}
23 "--prefix=${_sysroot}" \
24 "--bindir=/usr/bin" "--program-prefix=${_target}-" \
25 "--with-sysroot=${_sysroot}" \
26 "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
27 --with-gnu-as --with-gnu-ld \
28 --disable-nls --disable-threads \
29 --enable-languages=c \
30 --disable-multilib --disable-libgcj \
31 --without-headers --disable-shared \
34 make all-gcc "inhibit_libc=true" || return 1
36 make DESTDIR=${pkgdir} install-gcc || return 1
38 msg "Removing duplicit files..."
39 # remove these files as they are already in the system
41 rm -Rf ${pkgdir}${_sysroot}/{man,info}
42 # remove conflicting binaries
43 find ${pkgdir}/usr/bin/ -type f -not -name 'm68k-elf*' -delete
45 msg "Creating out-of-path executables..."
46 # symlink executables to single directory with no-arch-prefix name
47 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
48 cd ${pkgdir}/usr/bin/cross/${_target}/;
49 for bin in ${pkgdir}/usr/bin/${_target}-*; do
50 bbin=`basename "$bin"`;
51 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;