2 # Contributor: Alexander Rødseth <rodseth@gmail.com>
3 # Contributor: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
4 # Contributor: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
8 pkgdesc="The GNU Compiler Collection (4.4.x)"
10 url="http://gcc.gnu.org/"
11 license=('GPL' 'LGPL' 'custom')
12 depends=('binutils>=2.20.1' 'mpfr>=2.4.2-2' 'cloog' 'zlib' 'libelf')
14 source=("http://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2"
15 "gcc-hash-style-both.patch"
17 md5sums=('7ff5ce9e5f0b088ab48720bbd7203530'
18 '6fd395bacbd7b6e47c7b74854b478363'
19 '4030ee1c08dd1e843c0225b772360e76')
22 cd "$srcdir/gcc-$pkgver"
24 # Do not install libiberty
25 sed -i -e 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
26 # Do not run fixincludes
27 sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
28 patch -Np0 -i "$srcdir/gcc-hash-style-both.patch"
29 if test "$CARCH" == "x86_64"; then
30 patch -Np1 -i "$srcdir/gcc_pure64.patch"
32 echo "$pkgver" > gcc/BASE-VER
38 --mandir=/usr/share/man \
39 --infodir=/usr/share/info \
41 --libexecdir=/usr/lib \
42 --program-suffix=-4.4 \
44 --enable-languages=c,c++,fortran,objc,obj-c++ \
45 --enable-__cxa_atexit \
46 --disable-libstdcxx-pch \
49 --disable-libmudflap \
51 --enable-clocale=gnu \
60 cd "$srcdir/gcc-$pkgver/build"
62 make DESTDIR="$pkgdir" install
63 for f in "$pkgdir"/usr/share/info/*.info; do
64 n=`basename "$f" | sed -e 's/\.info/-4.4.info/'`
65 mv -f "$f" "$pkgdir/usr/share/info/$n"
67 rm -rf "$pkgdir/usr/share/man/man7"
68 rm -rf "$pkgdir/usr/share/locale"
69 mv "$pkgdir"/usr/lib/lib* \
70 "$pkgdir/usr/lib/gcc/$CHOST/$pkgver/"
71 # Install Runtime Library Exception
72 install -Dm644 ../COPYING.RUNTIME \
73 "$pkgdir/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION" \
74 # Create links for gcc-4.4 build environment (useful for CUDA)
75 mkdir -p "$pkgdir/opt/gcc-4.4"
76 ln -s /usr/bin/gcc-4.4 "$pkgdir/opt/gcc-4.4/gcc"
77 ln -s /usr/bin/g++-4.4 "$pkgdir/opt/gcc-4.4/g++"
80 # vim:set ts=2 sw=2 et: