CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
6b5f682a3b374405132aa21a1a1d47a9db533d9c
[ports/cubieboard2-arm.git] / gcc / Pkgfile
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
8 version=4.7.3
9 release=1
10 source=(ftp://gcc.gnu.org/pub/gcc/releases/$name-$version/$name-$version.tar.bz2
11 $name-nocheck-fixincludes.patch
12 $name-$version-gnueabihf.patch)
13
14 build() {
15 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
16 patch -d $name-$version -p1 -i $SRC/$name-$version-gnueabihf.patch
17
18 mkdir build
19 cd build
20
21 ../$name-$version/configure --prefix=/usr \
22 --build=arm-unknown-linux-gnueabihf \
23 --with-abi=aapcs-linux --with-mode=arm \
24 --with-mcpu=cortex-a7 --with-fpu=neon-vfpv4 \
25 --with-float=hard \
26 --mandir=/usr/man \
27 --libexecdir=/usr/lib \
28 --enable-languages=c,c++,objc \
29 --enable-threads=posix \
30 --enable-__cxa_atexit \
31 --enable-clocale=gnu \
32 --enable-shared \
33 --disable-nls \
34 --with-x=no \
35 --with-system-zlib \
36 --with-pkgversion="CRUX-ARM"
37 make bootstrap
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/
46 cp ../$name-$version/gcc/config/arm/arm-cores.def $PKG/usr/lib/gcc/arm-unknown-linux-gnueabihf/$version/plugin/include/config/arm/
47 cp ../$name-$version/gcc/config/vxworks-dummy.h $PKG/usr/lib/gcc/arm-unknown-linux-gnueabihf/$version/plugin/include/config/
48
49 rm -f $PKG/usr/lib/{libiberty.a,libstdc++.so.6.0.17-gdb.py}
50 rm -r $PKG/usr/share
51 rm -r $PKG/usr/bin/*-linux-gnu*
52 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
53
54 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
55 }