CRUX-ARM : Home

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