1 # Description: The GNU Compiler Collection
2 # URL: http://gcc.gnu.org
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: zlib libmpc
10 source=(http://ftp.gnu.org/gnu/gcc/$name-$version/$name-{core,g++,objc}-$version.tar.bz2
11 $name-nocheck-fixincludes.patch $name-$version-preprocessor_symbol.patch)
14 patch -p0 -i $SRC/$name-$version-preprocessor_symbol.patch
15 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
18 ../$name-$version/configure --prefix=/usr \
20 --libexecdir=/usr/lib \
21 --enable-languages=c,c++,objc \
22 --enable-threads=posix \
23 --enable-__cxa_atexit \
24 --enable-clocale=gnu \
29 --with-pkgversion="CRUX"
31 make -j1 DESTDIR=$PKG install
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++
38 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
40 rm $PKG/usr/lib/{libiberty.a,libstdc++.so.6.0.14-gdb.py}
42 rm -r $PKG/usr/bin/*-linux-gnu*
43 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
45 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}