2 # Maintainer: Jan de Groot <jgc@archlinux.org>
6 pkgdesc="The GNU Compiler Collection"
8 url="http://gcc.gnu.org"
9 license=('GPL') # with exception, per fsf.org
10 depends=('libstdc++5' 'gcc-libs')
12 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 \
13 gcc-localeversion.patch
15 md5sums=('5324ace5145b12afd9ca867af7ec084d'
16 'ef81fd74bc9fd964120af47243a1360f'
17 'e93d6f49b254dc2879a4e181603599b0'
18 'eb834abd7620a5f11492ee2c243b8346')
21 if ! locale -a | grep ^de_DE; then
22 echo "You need the de_DE locale to build gcc."
26 export CFLAGS="${CFLAGS/-mtune=generic/}"
27 export CXXFLAGS="${CXXFLAGS/-mtune=generic/}"
29 cd ${startdir}/src/gcc-${pkgver}
31 patch -Np0 -i ${startdir}/src/gcc-localeversion.patch || return 1
33 if [ "${CARCH}" = "x86_64" ]; then
34 patch -Np1 -i ../gcc-3.3-pure64.patch || return 1
37 # Don't run fixincludes
38 sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
39 # Don't install libiberty
40 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
44 ../gcc-${pkgver}/configure --prefix=/usr --enable-shared \
45 --enable-languages=c,c++ --enable-threads=posix \
46 --mandir=/usr/share/man --libexecdir=/usr/lib \
47 --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib \
48 --enable-clocale=gnu --program-suffix=-3.4
50 make bootstrap || return 1
51 make -j1 DESTDIR=${startdir}/pkg install || return 1
53 rm -f ${startdir}/pkg/usr/lib/lib{stdc++,supc++,gcc_s}.*
54 rm -f ${startdir}/pkg/usr/share/locale/*/LC_MESSAGES/libstdc++.mo
55 rm -rf ${startdir}/pkg/usr/share/man/man7