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 | |
8016236a | 8 | version=7.3.0 |
090c965e | 9 | release=1 |
8016236a | 10 | source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$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 \ | |
090c965e VM |
20 | --libexecdir=/usr/lib \ |
21 | --enable-languages=c,c++,objc \ | |
22 | --enable-threads=posix \ | |
23 | --enable-__cxa_atexit \ | |
24 | --enable-clocale=gnu \ | |
25 | --enable-shared \ | |
26 | --disable-nls \ | |
27 | --with-x=no \ | |
28 | --with-system-zlib \ | |
29 | --with-pkgversion="CRUX-ARM 64b" | |
30 | ||
31 | make | |
32 | make -j1 DESTDIR=$PKG install | |
33 | ||
34 | mkdir $PKG/lib | |
35 | ln -sf ../usr/bin/cpp $PKG/lib/cpp | |
36 | ln -sf gcc $PKG/usr/bin/cc | |
37 | ln -sf g++ $PKG/usr/bin/c++ | |
38 | ||
39 | mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/ | |
090c965e VM |
40 | rm -r $PKG/usr/share/{info,$name-$version} |
41 | rm -r $PKG/usr/bin/*-linux-gnu* | |
42 | rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} | |
43 | ||
8016236a VM |
44 | for D in lib64; do |
45 | install -d -m 0755 $PKG/usr/share/gdb/auto-load/usr/${D} | |
46 | mv $PKG/usr/${D}/libstdc++.so.*-gdb.py $PKG/usr/share/gdb/auto-load/usr/${D} | |
47 | done | |
48 | ||
090c965e VM |
49 | sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib64/{libstdc++.la,libsupc++.la} |
50 | } |