blob: 80f3fc24e17400fa9c87bcd8e22b712de6bb05c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# $Id: PKGBUILD 162071 2012-06-19 12:28:59Z allan $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
pkgname=gcc4.6
pkgver=4.6.3
_ver=${pkgver:0:3}
pkgrel=2
pkgdesc="The GNU Compiler Collection ($_ver; C and C++)"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
depends=('glibc' 'binutils' 'gmp' 'mpfr' 'libmpc' 'ppl' 'isl' 'cloog')
makedepends=('flex' 'bison')
checkdepends=('dejagnu')
options=('!libtool' '!emptydirs')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
gcc_pure64.patch
gcc-hash-style-both.patch
gcc-4.6.2-cloog-0.17.patch)
md5sums=('773092fe5194353b02bb0110052a972e'
'4030ee1c08dd1e843c0225b772360e76'
'4df25b623799b148a0703eaeec8fdf3f'
'6d9939a2e667376031679ac9f9c49263')
build() {
cd gcc-$pkgver
# Do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
if [ "${CARCH}" = "x86_64" ]; then
patch -p1 -i ${srcdir}/gcc_pure64.patch
fi
patch -p0 -i ${srcdir}/gcc-hash-style-both.patch
# compatibility with latest cloog
patch -p1 -i ${srcdir}/gcc-4.6.2-cloog-0.17.patch
echo ${pkgver} > gcc/BASE-VER
cd ..
mkdir gcc-build
cd gcc-build
../gcc-$pkgver/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share/gcc-$_ver \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,lto \
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
--disable-libstdcxx-pch --enable-libstdcxx-time \
--enable-gnu-unique-object --enable-linker-build-id \
--with-ppl --enable-cloog-backend=isl \
--enable-lto --enable-gold --enable-ld=default \
--enable-plugin --with-plugin-ld=ld.gold \
--disable-multilib --disable-libssp \
--enable-checking=release \
--program-suffix=-$_ver \
--enable-version-specific-runtime-libs
make
}
check() {
# increase stack size to prevent test failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
ulimit -s 32768
# do not abort on error as some are "expected"
make -C gcc-build -k check || true
gcc-$pkgver/contrib/test_summary
}
package()
{
make -j1 -C gcc-build DESTDIR=${pkgdir} install
# Install Runtime Library Exception
install -Dm644 gcc-$pkgver/COPYING.RUNTIME \
$pkgdir/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION
# deal with conflicting man and info pages
cd $pkgdir
rm usr/share/man/man7/{fsf-funding,gfdl,gpl}.7
for i in usr/share/info/*; do
mv $i ${i%.info}-$_ver.info
done
}
|