Commit | Line | Data |
---|---|---|
bd625380 | 1 | # Description: The GNU Compiler Collection |
676c65bf | 2 | # URL: http://gcc.gnu.org/ |
bd625380 VM |
3 | # Maintainer: CRUX System Team, core-ports at crux dot nu |
4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu | |
676c65bf | 5 | # Depends on: libmpc zlib |
bd625380 VM |
6 | |
7 | name=gcc | |
676c65bf VM |
8 | version=4.6.2 |
9 | release=1 | |
10 | ||
11 | source=(http://ftp.gnu.org/gnu/gcc/$name-$version/$name-$version.tar.bz2 | |
12 | $name-nocheck-fixincludes.patch gcc-4.6-gnueabihf.patch) | |
bd625380 VM |
13 | |
14 | build() { | |
676c65bf | 15 | patch -d $name-$version -p1 -i $SRC/$name-4.6-gnueabihf.patch |
bd625380 | 16 | patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch |
676c65bf | 17 | |
bd625380 VM |
18 | mkdir build |
19 | cd build | |
20 | ../$name-$version/configure --prefix=/usr \ | |
676c65bf | 21 | --build=$MACHTYPE \ |
bd625380 VM |
22 | --mandir=/usr/man \ |
23 | --libexecdir=/usr/lib \ | |
24 | --enable-languages=c,c++,objc \ | |
25 | --enable-threads=posix \ | |
26 | --enable-__cxa_atexit \ | |
27 | --enable-clocale=gnu \ | |
28 | --enable-shared \ | |
676c65bf | 29 | --with-float=hard \ |
bd625380 VM |
30 | --disable-nls \ |
31 | --with-x=no \ | |
32 | --with-system-zlib \ | |
33 | --with-pkgversion="CRUX" | |
34 | make bootstrap | |
35 | make -j1 DESTDIR=$PKG install | |
36 | ||
37 | mkdir $PKG/lib | |
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++ | |
41 | ||
42 | mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/ | |
43 | ||
676c65bf | 44 | rm $PKG/usr/lib/{libiberty.a,libstdc++.so.*-gdb.py} |
bd625380 | 45 | rm -r $PKG/usr/share |
676c65bf | 46 | rm -r $PKG/usr/bin/*-linux-gnueabi* |
bd625380 VM |
47 | rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} |
48 | ||
49 | sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la} | |
50 | } |