Commit | Line | Data |
---|---|---|
bd625380 | 1 | # Description: The GNU Compiler Collection |
e4b6f718 | 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 | |
e4b6f718 | 5 | # Depends on: zlib libmpc |
bd625380 VM |
6 | |
7 | name=gcc | |
e722ceaa VM |
8 | version=4.7.3 |
9 | release=1 | |
e4b6f718 | 10 | source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 |
166a3882 | 11 | $name-nocheck-fixincludes.patch |
e4b6f718 | 12 | $name-$version-gnueabihf.patch) |
bd625380 VM |
13 | |
14 | build() { | |
bd625380 | 15 | patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch |
e4b6f718 | 16 | patch -d $name-$version -p1 -i $SRC/$name-$version-gnueabihf.patch |
676c65bf | 17 | |
bd625380 VM |
18 | mkdir build |
19 | cd build | |
e4b6f718 | 20 | |
bd625380 | 21 | ../$name-$version/configure --prefix=/usr \ |
91eac73a | 22 | --build=arm-unknown-linux-gnueabihf \ |
e4b6f718 VM |
23 | --with-abi=aapcs-linux --with-mode=arm \ |
24 | --with-float=hard \ | |
bd625380 VM |
25 | --mandir=/usr/man \ |
26 | --libexecdir=/usr/lib \ | |
27 | --enable-languages=c,c++,objc \ | |
28 | --enable-threads=posix \ | |
29 | --enable-__cxa_atexit \ | |
30 | --enable-clocale=gnu \ | |
31 | --enable-shared \ | |
32 | --disable-nls \ | |
33 | --with-x=no \ | |
34 | --with-system-zlib \ | |
e4b6f718 | 35 | --with-pkgversion="CRUX-ARM" |
bd625380 VM |
36 | make bootstrap |
37 | make -j1 DESTDIR=$PKG install | |
38 | ||
39 | mkdir $PKG/lib | |
40 | ln -sf ../usr/bin/cpp $PKG/lib/cpp | |
41 | ln -sf gcc $PKG/usr/bin/cc | |
42 | ln -sf g++ $PKG/usr/bin/c++ | |
43 | ||
e722ceaa | 44 | mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/ |
5371a9ac FR |
45 | cp ../$name-$version/gcc/config/arm/arm-cores.def $PKG/usr/lib/gcc/arm-unknown-linux-gnueabihf/$version/plugin/include/config/arm/ |
46 | cp ../$name-$version/gcc/config/vxworks-dummy.h $PKG/usr/lib/gcc/arm-unknown-linux-gnueabihf/$version/plugin/include/config/ | |
bd625380 | 47 | |
e4b6f718 VM |
48 | rm -f $PKG/usr/lib/{libiberty.a,libstdc++.so.6.0.17-gdb.py} |
49 | rm -r $PKG/usr/share | |
50 | rm -r $PKG/usr/bin/*-linux-gnu* | |
e722ceaa | 51 | rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed} |
bd625380 VM |
52 | |
53 | sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la} | |
54 | } |