CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gcc: updated to 4.8.3
[ports/cubieboard2-arm.git] / gcc / Pkgfile
CommitLineData
be3a5294
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
7name=gcc
644612b1 8version=4.8.3
be3a5294
VM
9release=1
10source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2
644612b1 11 $name-nocheck-fixincludes.patch $name-$version-gnueabihf.patch)
be3a5294
VM
12
13build() {
14 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
15 patch -d $name-$version -p1 -i $SRC/$name-$version-gnueabihf.patch
16
17 mkdir build
18 cd build
19
20 ../$name-$version/configure --prefix=/usr \
21 --build=arm-unknown-linux-gnueabihf \
22 --with-abi=aapcs-linux --with-mode=arm \
23 --with-mcpu=cortex-a7 --with-fpu=neon-vfpv4 \
24 --with-float=hard \
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 \
35 --with-pkgversion="CRUX-ARM"
644612b1
VM
36
37 make
be3a5294
VM
38 make -j1 DESTDIR=$PKG install
39
40 mkdir $PKG/lib
41 ln -sf ../usr/bin/cpp $PKG/lib/cpp
42 ln -sf gcc $PKG/usr/bin/cc
43 ln -sf g++ $PKG/usr/bin/c++
44
45 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
be3a5294 46
644612b1 47 rm $PKG/usr/lib/libstdc++.so.6.0.19-gdb.py
be3a5294
VM
48 rm -r $PKG/usr/share
49 rm -r $PKG/usr/bin/*-linux-gnu*
50 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
51
52 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
53}