66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
# Description: The GNU Compiler Collection.
|
|
# URL: http://gcc.gnu.org/
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Packager: Antonio SJ Musumeci
|
|
|
|
name=gcc34
|
|
version=3.4.6
|
|
release=2
|
|
source=(ftp://sources.redhat.com/pub/gcc/releases/gcc-$version/gcc-$version.tar.bz2 \
|
|
gcc-$version-linkonce.patch
|
|
gcc-$version-unlink-if-ordinary.patch
|
|
gcc-$version-visibility.patch)
|
|
|
|
build() {
|
|
local SUFFIX=-${version%.*}
|
|
patch -d gcc-$version -p 1 -i ../gcc-$version-linkonce.patch
|
|
patch -d gcc-$version -p 1 -i ../gcc-$version-unlink-if-ordinary.patch
|
|
patch -d gcc-$version -p 1 -i ../gcc-$version-visibility.patch
|
|
|
|
mkdir build
|
|
cd build
|
|
|
|
CFLAGS='-march=i686 -O2 -pipe'
|
|
CXXFLAGS='-march=i686 -O2 -pipe'
|
|
|
|
../gcc-$version/configure \
|
|
--prefix=/usr \
|
|
--libexecdir=/usr/lib \
|
|
--program-suffix=$SUFFIX \
|
|
--enable-languages=c,c++,objc \
|
|
--enable-threads=posix \
|
|
--enable-__cxa_atexit \
|
|
--enable-clocale=gnu \
|
|
--enable-shared \
|
|
--disable-nls \
|
|
--with-x=no
|
|
|
|
if [ -n "$(pkginfo -i | grep '^ccache ')" ]; then
|
|
make STAGE_CC_WRAPPER='/usr/bin/ccache' BOOT_CFLAGS="$CFLAGS" bootstrap
|
|
elif [ -n "$(pkginfo -i | grep '^distcc ')" ]; then
|
|
make STAGE_CC_WRAPPER='/usr/bin/distcc' BOOT_CFLAGS="$CFLAGS" bootstrap
|
|
else
|
|
make BOOT_CFLAGS="$CFLAGS" bootstrap
|
|
fi
|
|
|
|
# make check
|
|
make -j 1 DESTDIR=$PKG install
|
|
|
|
install -d $PKG/lib
|
|
ln -sf ../usr/bin/cpp$SUFFIX $PKG/lib/cpp$SUFFIX
|
|
ln -sf gcc$SUFFIX $PKG/usr/bin/cc$SUFFIX
|
|
ln -sf g++$SUFFIX $PKG/usr/bin/c++$SUFFIX
|
|
|
|
rm -r \
|
|
$PKG/usr/man \
|
|
$PKG/usr/lib/lib{stdc++,supc++,gcc_s,objc}.* \
|
|
$PKG/usr/lib/gcc/*/$version/install-tools
|
|
|
|
rm -rf $PKG/usr/info
|
|
|
|
rm \
|
|
$PKG/usr/lib/libiberty.a \
|
|
$PKG/usr/bin/*-linux-gnu-* \
|
|
$PKG/usr/lib/gcc/*/$version/include/README
|
|
}
|