2006-02-23 15:26:10 +00:00
|
|
|
# Description: The GNU Compiler Collection
|
|
|
|
# URL: http://gcc.gnu.org
|
2007-01-23 17:25:18 +00:00
|
|
|
# Packager: CRUX System Team, core-ports at crux dot nu
|
2007-01-23 17:35:30 +00:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
name=gcc
|
2008-05-22 15:50:42 +02:00
|
|
|
version=4.2.4
|
2006-11-20 12:08:00 +00:00
|
|
|
release=1
|
|
|
|
source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-{core,g++,objc}-$version.tar.bz2
|
|
|
|
$name-$version-nocheck-fixincludes.patch
|
2006-03-16 16:26:09 +00:00
|
|
|
$name-$version-fixinc.patch)
|
2006-03-15 19:00:12 +00:00
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
build() {
|
2008-05-22 15:50:42 +02:00
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-$version-nocheck-fixincludes.patch
|
|
|
|
patch -d $name-$version -p1 -i $SRC/$name-$version-fixinc.patch
|
2006-03-15 22:55:44 +00:00
|
|
|
|
2006-11-20 12:08:00 +00:00
|
|
|
sed -i -e 's|VERSUFFIX ""|VERSUFFIX " (CRUX)"|' \
|
|
|
|
$name-$version/$name/version.c
|
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../$name-$version/configure --prefix=/usr \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--enable-languages=c,c++,objc \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--enable-clocale=gnu \
|
|
|
|
--enable-shared \
|
2006-02-23 17:29:54 +00:00
|
|
|
--disable-nls \
|
|
|
|
--with-x=no
|
2006-02-23 15:26:10 +00:00
|
|
|
make bootstrap
|
2006-03-15 19:00:12 +00:00
|
|
|
make check
|
2007-09-10 08:36:05 +02:00
|
|
|
make -j1 DESTDIR=$PKG install
|
2006-03-15 19:00:12 +00:00
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
mkdir $PKG/lib
|
|
|
|
ln -sf ../usr/bin/cpp $PKG/lib/cpp
|
|
|
|
ln -sf gcc $PKG/usr/bin/cc
|
|
|
|
ln -sf g++ $PKG/usr/bin/c++
|
|
|
|
rm -rf $PKG/usr/info $PKG/usr/lib/libiberty.a \
|
|
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
|
|
$PKG/usr/lib/gcc/*/$version/install-tools \
|
2006-03-16 16:26:09 +00:00
|
|
|
$PKG/usr/lib/gcc/*/$version/include/README
|
2006-02-23 15:26:10 +00:00
|
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
|
|
|
|
}
|