CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
binutils: update to 2.22. Removed host's texinfo dependency.
[crossrootfs.git] / gcc / Pkgfile
CommitLineData
6dca1d21
JB
1# Description: The GNU Compiler Collection
2# URL: http://gcc.gnu.org
3# Maintainer: CRUX System Team, core-ports at crux dot nu
b751b192 4# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
747a910d 5# Depends on: zlib libmpc
6dca1d21
JB
6
7name=gcc
317a7556 8version=4.6.1
6dca1d21 9release=1
90f92569 10source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-{core,g++}-$version.tar.bz2
317a7556 11 $name-$version-gnueabihf.patch)
6dca1d21
JB
12
13
14build() {
90f92569 15 cd $name-$version
317a7556 16 patch -p1 -i $SRC/$name-$version-gnueabihf.patch
90f92569
JB
17 sed -i 's|REVISION|REVISION " (CRUX)"|' $name/version.c
18 # apply a sed substitutio that will suppress the installation of libiberty.a
19 sed 's|install_to_$(INSTALL_DEST) ||' -i libiberty/Makefile.in
90f92569
JB
20
21 mkdir $SRC/build
22 cd $SRC/build
23
24 LDFLAGS="-Wl,-rpath-link,$CROSSTOOLS/$CTARGET/lib" \
9be8a544
VM
25 ../$name-$version/configure --build=$CHOST \
26 --host=$CTARGET \
27 --target=$CTARGET \
90f92569 28 --prefix=/usr \
2d0bfa97 29 --mandir=/usr/man \
90f92569
JB
30 --libexecdir=/usr/lib \
31 --enable-languages=c,c++ \
2d0bfa97 32 --disable-libstdcxx-pch \
90f92569 33 --enable-threads=posix \
90f92569
JB
34 --enable-__cxa_atexit \
35 --enable-clocale=gnu \
2d0bfa97 36 --enable-shared \
5782eb15 37 --with-float=hard \
90f92569 38 --disable-nls \
2d0bfa97
VM
39 --with-x=no \
40 --with-system-zlib \
41 --with-pkgversion="CRUX"
90f92569
JB
42
43 # prevent GCC from looking in the wrong directories for headers and libraries
44 sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" -i Makefile
45
46 make
47 make DESTDIR=$PKG install
48
49 mkdir $PKG/lib
50 ln -sf ../usr/bin/cpp $PKG/lib/cpp
51 ln -sf gcc $PKG/usr/bin/cc
52 ln -sf g++ $PKG/usr/bin/c++
2d0bfa97 53
90f92569 54 mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
2d0bfa97 55
317a7556 56 rm $PKG/usr/lib/libstdc++.so.6.0.16-gdb.py
2d0bfa97
VM
57 rm -r $PKG/usr/share
58 rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
90f92569
JB
59
60 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
6dca1d21 61}