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.xz
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=aarch64-unknown-linux-gnueabi \
21 --libexecdir=/usr/lib \
22 --enable-languages=c,c++,objc \
23 --enable-threads=posix \
24 --enable-__cxa_atexit \
25 --enable-clocale=gnu \
30 --with-pkgversion="CRUX-ARM 64b"
33 make -j1 DESTDIR=$PKG install
36 ln -sf ../usr/bin/cpp $PKG/lib/cpp
37 ln -sf gcc $PKG/usr/bin/cc
38 ln -sf g++ $PKG/usr/bin/c++
40 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
41 rm $PKG/usr/lib64/libstdc++.so.6.0.22-gdb.py
42 rm -r $PKG/usr/share/{info,$name-$version}
43 rm -r $PKG/usr/bin/*-linux-gnu*
44 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
46 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib64/{libstdc++.la,libsupc++.la}