CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gcc: hardcoded build configure option arm-crux-linux-gnueabihf
[ports/core-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: libmpc zlib
6
7 name=gcc
8 version=4.6.2
9 release=1
10
11 source=(http://ftp.gnu.org/gnu/gcc/$name-$version/$name-$version.tar.bz2
12 $name-nocheck-fixincludes.patch gcc-4.6-gnueabihf.patch)
13
14 build() {
15 patch -d $name-$version -p1 -i $SRC/$name-4.6-gnueabihf.patch
16 patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch
17
18 mkdir build
19 cd build
20 ../$name-$version/configure --prefix=/usr \
21 --build=arm-crux-linux-gnueabihf \
22 --mandir=/usr/man \
23 --libexecdir=/usr/lib \
24 --enable-languages=c,c++,objc \
25 --enable-threads=posix \
26 --enable-__cxa_atexit \
27 --enable-clocale=gnu \
28 --enable-shared \
29 --with-float=hard \
30 --disable-nls \
31 --with-x=no \
32 --with-system-zlib \
33 --with-pkgversion="CRUX"
34 make bootstrap
35 make -j1 DESTDIR=$PKG install
36
37 mkdir $PKG/lib
38 ln -sf ../usr/bin/cpp $PKG/lib/cpp
39 ln -sf gcc $PKG/usr/bin/cc
40 ln -sf g++ $PKG/usr/bin/c++
41
42 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
43
44 rm $PKG/usr/lib/{libiberty.a,libstdc++.so.*-gdb.py}
45 rm -r $PKG/usr/share
46 rm -r $PKG/usr/bin/*-linux-gnueabi*
47 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
48
49 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
50 }