1 # Maintainer: Allan McRae <allan@archlinux.org>
6 pkgver=${_ver}.${_snapshot}
8 pkgdesc="The GNU Compiler Collection developmental snapshot"
10 license=('GPL3' 'LGPL' 'custom')
11 url="http://gcc.gnu.org"
12 depends=('glibc' 'binutils' 'gmp' 'mpfr' 'libmpc' 'ppl' 'isl' 'cloog')
13 makedepends=('flex' 'bison')
15 source=(ftp://gcc.gnu.org/pub/gcc/snapshots/${_ver}-${_snapshot}/gcc-${_ver}-${_snapshot}.tar.bz2
17 md5sums=('05789643db88f8e037958b6b313f89fb'
18 'ced48436c1b3c981d721a829f1094de1')
22 # add ada,fortran,go,objc,obj-c++ as wanted
23 # additional languages not tested... leave a comment about conflicts
24 _languages="c,c++,lto"
26 cd ${srcdir}/gcc-${_ver}-${_snapshot}
28 # Do not install libiberty
29 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
31 # Do not run fixincludes
32 sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
34 if [ "${CARCH}" = "x86_64" ]; then
35 patch -Np1 -i ${srcdir}/gcc_pure64.patch
39 mkdir gcc-build && cd gcc-build
41 ${srcdir}/gcc-${_ver}-${_snapshot}/configure --prefix=/usr \
42 --libdir=/usr/lib --libexecdir=/usr/lib \
43 --mandir=/usr/share/man --infodir=/usr/share/info \
44 --datadir=/usr/share/gcc-${_ver} \
45 --with-bugurl=http://aur.archlinux.org/packages.php?ID=16045 \
46 --enable-languages=${_languages} \
47 --enable-shared --enable-threads=posix \
48 --with-system-zlib --enable-__cxa_atexit \
49 --disable-libunwind-exceptions --enable-clocale=gnu \
50 --enable-gnu-unique-object --enable-linker-build-id \
51 --with-ppl --enable-cloog-backend=isl \
52 --enable-lto --enable-gold --enable-ld=default \
53 --enable-plugin --with-plugin-ld=ld.gold \
54 --with-linker-hash-style=gnu \
55 --disable-multilib --disable-libssp --disable-libstdcxx-pch \
56 --enable-checking=release --disable-werror \
57 --program-suffix=-${_ver} --enable-version-specific-runtime-libs
64 cd ${srcdir}/gcc-build
66 make -j1 DESTDIR=${pkgdir} install
68 # deal with conflicting man and info pages
69 rm ${pkgdir}/usr/share/man/man7/{fsf-funding,gfdl,gpl}.7
70 for i in $pkgdir/usr/share/info/*; do
71 mv $i ${i//.info}-${_ver}.info
74 install -Dm644 ${srcdir}/gcc-${_ver}-${_snapshot}/COPYING.RUNTIME \
75 ${pkgdir}/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION