# $Header: /magellan-cvs/smage/gcc-v3/gcc-v3-3.3.6-r3.smage2,v 1.1 2006/07/09 16:32:59 niro Exp $ PNAME="gcc-v3" PVER="3.3.6" PBUILD="r4" PCATEGORIE="sys-dev" STATE="unstable" DESCRIPTION="Compat C/C++ compiler written by the GNU people." HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" DEPEND=">= virtual/glibc" SDEPEND=">= sys-dev/binutils-2.4" SRCFILE="gcc-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/gcc-${PVER}" # languages to build into gcc MyLanguages=c,c++ SRC_URI=( gnu://gcc/${SRCFILE} mirror://gcc/${SRCFILE} mirror://gcc/gcc-${PVER}-no_fixincludes-1.patch mirror://gcc/gcc-${PVER}-magellan-version.patch ) # prevent issues with gcc-3.4.x export CFLAGS="-O" export CXXFLAGS="-O" # check for crosscompile or export default CHOST if [[ -z ${CCHOST} ]] then # no crosscompile defined export CCHOST=${CHOST} else # use crosscompile host export CCHOST=${CCHOST} fi src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch gcc-${PVER}-no_fixincludes-1.patch || die mpatch gcc-${PVER}-magellan-version.patch || die # suppress installation of libiberty, as we will be # using the one from binutils sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || die install -d ${SRCDIR}/build || die cd ${SRCDIR}/build } src_compile() { cd ${SRCDIR}/build # install this thing to /opt/gcc-${PVER} ../configure \ --host=${CHOST} \ --target=${CCHOST} \ --prefix=/opt/gcc-${PVER} \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-clocale=gnu \ --disable-checking \ --disable-libunwind-exceptions \ --with-system-zlib \ --enable-long-long \ --enable-cstdio=stdio \ --enable-languages=${MyLanguages} \ || die # smaller boostrap mmake bootstrap-lean || die } src_install() { cd ${SRCDIR}/build make DESTDIR=${BINDIR} install || die }