Commit | Line | Data |
---|---|---|
090c965e VM |
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 | |
6 | ||
7 | name=gcc | |
3844117d | 8 | version=6.4.0 |
090c965e | 9 | release=1 |
3844117d | 10 | source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.xz |
090c965e VM |
11 | $name-nocheck-fixincludes.patch) |
12 | ||
13 | build() { | |
14 | patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch | |
15 | ||
16 | mkdir build | |
17 | cd build | |
18 | ||
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 \ | |
26 | --enable-shared \ | |
27 | --disable-nls \ | |
28 | --with-x=no \ | |
29 | --with-system-zlib \ | |
30 | --with-pkgversion="CRUX-ARM 64b" | |
31 | ||
32 | make | |
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/ | |
3ca26030 | 41 | rm $PKG/usr/lib64/libstdc++.so.6.0.22-gdb.py |
090c965e VM |
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} | |
45 | ||
46 | sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib64/{libstdc++.la,libsupc++.la} | |
47 | } |