45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
# Description: The GNU Compiler Collection
|
|
# URL: http://gcc.gnu.org
|
|
# Maintainer: Per Lidén <per@fukt.bth.se>
|
|
|
|
name=gcc
|
|
version=4.0.3
|
|
release=2
|
|
source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 \
|
|
$name-$version-latentbug-addrefvars.patch \
|
|
$name-$version-nocheck-fixincludes.patch \
|
|
$name-$version-version.patch \
|
|
$name-$version-fixinc.patch)
|
|
|
|
build() {
|
|
patch -d $name-$version -p1 < $SRC/$name-$version-latentbug-addrefvars.patch
|
|
patch -d $name-$version -p1 < $SRC/$name-$version-nocheck-fixincludes.patch
|
|
patch -d $name-$version -p1 < $SRC/$name-$version-version.patch
|
|
patch -d $name-$version -p1 < $SRC/$name-$version-fixinc.patch
|
|
|
|
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 \
|
|
--disable-nls \
|
|
--with-x=no
|
|
make bootstrap
|
|
make check
|
|
make DESTDIR=$PKG install
|
|
|
|
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 \
|
|
$PKG/usr/lib/gcc/*/$version/include/README
|
|
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
|
|
}
|