blob: 672a05ebe348ca411852fbd8672509b6430525a3 (
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: zlib libmpc
5
6 name=gcc
7 version=4.7.2
8 release=1
9 source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 \
10 $name-nocheck-fixincludes.patch $name-$version-multilib-dirs.patch)
11
12
13 build() {
14 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
15 patch -d $name-$version -p1 -i $SRC/$name-$version-multilib-dirs.patch
16
17 mkdir build
18 cd build
19 ../$name-$version/configure --prefix=/usr \
20 --mandir=/usr/man \
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 --with-system-zlib \
30 --enable-multilib \
31 --with-pkgversion="CRUX-x86_64-multilib"
32 make bootstrap
33 make -j1 DESTDIR=$PKG install
34
35 mkdir $PKG/lib
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++
39
40 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
41
42 rm -f $PKG/usr/lib{,32}/{libiberty.a,libstdc++.so.6.0.17-gdb.py}
43 rm -r $PKG/usr/share
44 rm -r $PKG/usr/bin/*-linux-gnu-*
45 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
46
47 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib{,32}/{libstdc++.la,libsupc++.la}
48 }
|