blob: b15553ac094d57f7d116a4cb91ab12cfe0f8060e (
plain)
1 # Description: The GNU Compiler Collection
2 # URL: http://gcc.gnu.org
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Depends on: libgmp libmpfr
5
6 name=gcc
7 version=4.4.3
8 release=1
9 source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-{core,g++,objc}-$version.tar.bz2
10 $name-nocheck-fixincludes.patch test-demangle.c.diff)
11
12
13 build() {
14 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
15 patch -d $name-$version -p0 -i $SRC/test-demangle.c.diff
16 sed -i 's|REVISION|REVISION " (CRUX)"|' $name-$version/$name/version.c
17
18 mkdir build
19 cd build
20 ../$name-$version/configure --prefix=/usr \
21 --libexecdir=/usr/lib \
22 --enable-languages=c,c++,objc \
23 --enable-threads=posix \
24 --enable-__cxa_atexit \
25 --enable-clocale=gnu \
26 --enable-shared \
27 --disable-nls \
28 --with-x=no
29 make bootstrap
30 make -j1 check
31 make -j1 DESTDIR=$PKG install
32
33 mkdir $PKG/lib
34 ln -sf ../usr/bin/cpp $PKG/lib/cpp
35 ln -sf gcc $PKG/usr/bin/cc
36 ln -sf g++ $PKG/usr/bin/c++
37 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
38 rm -rf $PKG/usr/info $PKG/usr/lib/libiberty.a \
39 $PKG/usr/bin/*-linux-gnu-* \
40 $PKG/usr/lib/gcc/*/$version/install-tools \
41 $PKG/usr/lib/gcc/*/$version/include/README \
42 $PKG/usr/lib/gcc/*/$version/include-fixed
43
44 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
45 }
|