Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#2111 - GCC 3.4.3 modification to cut down on download traffic (and some compile time)

Attached to Project: Arch Linux
Opened by Alexander Baldeck (kth5) - Monday, 31 January 2005, 06:55 GMT
Task Type Feature Request
Category Packages: Current
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


i suggest that the pkgbuild for gcc in base/ should only download the tarballs actually needed to compile GCC with the 3 languages supported in Arch right now.

if i am wrong teach me otherwise but i prefer not to download about 20megs extra. :)

the pkgbuild for Arch/PPC is going to look like this:

# $Id: PKGBUILD,v 2005/01/20 17:11:05 kth5 Exp $
# Maintainer: judd <>
# Modified for ABS/PPC: kth5 <>
pkgdesc="The GNU Compiler Collection"
depends=('glibc' 'binutils')
source=($pkgver/$pkgname-core-$pkgver.tar.bz2 \$pkgver/$pkgname-g++-$pkgver.tar.bz2 \$pkgver/$pkgname-objc-$pkgver.tar.bz2 \$pkgname-core-3.3.3.tar.gz \$pkgname-g++-3.3.3.tar.gz )

build() {
# build backward-compatible libstdc++ library
# (unfortunately, it seems we have to build the whole thing
# to get the libstdc++ libraries)
cd $startdir/src/gcc-3.3.3
mkdir ../gcc-build
cd ../gcc-build
../gcc-3.3.3/configure --prefix=/usr --enable-shared \
--enable-languages=c++ --enable-threads=posix --enable-__cxa_atexit
make bootstrap || return 1
make DESTDIR=$startdir/pkg install || return 1
# remove everything but the libstdc++ libs
rm -rf $startdir/pkg/lib $startdir/pkg/usr/{bin,include,man,share}
cd $startdir/pkg/usr/lib
rm -rf gcc-lib libgcc* libobjc* libsupc* libiberty*
rm -f libstdc++.{so,a,la}
rm -rf $startdir/src/gcc-build

# now build the new (current) version
cd $startdir/src/gcc-$pkgver
mkdir ../gcc-build
cd ../gcc-build
../gcc-$pkgver/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit
make bootstrap || return 1
make DESTDIR=$startdir/pkg install || return 1
rm -rf $startdir/pkg/usr/bin/c++filt $startdir/pkg/usr/lib/libiberty.a
mkdir -p $startdir/pkg/lib
(cd $startdir/pkg/lib; ln -s ../usr/bin/cpp)
(cd $startdir/pkg/usr/bin; ln -sf gcc cc; ln -sf g++ c++)
# get rid of the references to my build dir
sed -i "s|-L$startdir/src[^ ]* ||g" $startdir/pkg/usr/lib/{,}
chmod 644 $startdir/pkg/usr/lib/*.la
This task depends upon

This task blocks these from closing
 FS#2223 - GCC 3.4 + symbol visibility 
Closed by  Judd Vinet (judd)
Thursday, 03 March 2005, 20:26 GMT
Reason for closing:  Fixed
Comment by Alexander Baldeck (kth5) - Monday, 31 January 2005, 08:17 GMT
i forgot to mention the most important advantage of my version, silly me. here it is:
you don't really have to provide --enable-languages=c,c++,objc for the first run to get the old libstc++. only c++ will be enough whith greatly influences time needed to compile the first step.