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=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2
11 $name-nocheck-fixincludes.patch)
14 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
19 ../$name-$version/configure --prefix=/usr \
20 --build=arm-unknown-linux-gnueabihf \
21 --with-abi=aapcs-linux --with-mode=arm \
23 --libexecdir=/usr/lib \
24 --enable-languages=c,c++,objc \
25 --enable-threads=posix \
26 --enable-__cxa_atexit \
27 --enable-clocale=gnu \
32 --with-pkgversion="CRUX-ARM"
35 make -j1 DESTDIR=$PKG install
38 ln -sf ../usr/bin/cpp $PKG/lib/cpp
39 ln -sf gcc $PKG/usr/bin/cc
40 ln -sf g++ $PKG/usr/bin/c++
42 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
43 rm $PKG/usr/lib/libstdc++.so.6.0.21-gdb.py
44 rm -r $PKG/usr/share/{info,$name-$version}
45 rm -r $PKG/usr/bin/*-linux-gnu*
46 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
48 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}