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 | |
ebb99efe | 8 | version=10.2.0 |
090c965e | 9 | release=1 |
8016236a | 10 | source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$version/$name-$version.tar.xz \ |
dae35c05 | 11 | $name-nocheck-fixincludes.patch $name-aarch64-dirs.patch) |
090c965e VM |
12 | |
13 | build() { | |
14 | patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch | |
dae35c05 | 15 | patch -d $name-$version -p1 -i $SRC/gcc-aarch64-dirs.patch |
090c965e VM |
16 | |
17 | mkdir build | |
18 | cd build | |
19 | ||
20 | ../$name-$version/configure --prefix=/usr \ | |
090c965e VM |
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 \ | |
dae35c05 VM |
30 | --enable-multilib \ |
31 | --enable-default-pie \ | |
32 | --enable-default-ssp \ | |
090c965e VM |
33 | --with-pkgversion="CRUX-ARM 64b" |
34 | ||
dae35c05 | 35 | make bootstrap |
090c965e VM |
36 | make -j1 DESTDIR=$PKG install |
37 | ||
dae35c05 | 38 | install -d $PKG/lib |
090c965e VM |
39 | ln -sf ../usr/bin/cpp $PKG/lib/cpp |
40 | ln -sf gcc $PKG/usr/bin/cc | |
41 | ln -sf g++ $PKG/usr/bin/c++ | |
42 | ||
43 | mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/ | |
090c965e VM |
44 | rm -r $PKG/usr/share/{info,$name-$version} |
45 | rm -r $PKG/usr/bin/*-linux-gnu* | |
46 | rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} | |
47 | ||
dae35c05 | 48 | for D in lib; do |
8016236a VM |
49 | install -d -m 0755 $PKG/usr/share/gdb/auto-load/usr/${D} |
50 | mv $PKG/usr/${D}/libstdc++.so.*-gdb.py $PKG/usr/share/gdb/auto-load/usr/${D} | |
51 | done | |
52 | ||
dae35c05 | 53 | sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la} |
090c965e | 54 | } |