[ create a new paste ] login | about

Link: http://codepad.org/46fsg2HV    [ raw code | fork ]

Plain Text, pasted on Apr 16:
# $Id$
# Maintainer: Andreas Messer <andi@bastelmap.de>
# Based on arm-elf-gcc-base by Sergej Pupykin <pupykin.s+arch@gmail.com>

_target=arm-eabi

pkgname=${_target}-gcc
pkgver=4.8.0
pkgrel=1
pkgdesc="The GNU Compiler Collection"
arch=(i686 x86_64)
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
makedepends=("${_target}-binutils>=2.23" 'libmpc' 'cloog' 'ppl')
depends=("${_target}-newlib")
conflicts=("${_target}-gcc-base")
provides=("${_target}-gcc-base")
replaces=("${_target}-gcc-base")
options=(!libtool !emptydirs !strip)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2)
md5sums=('e6040024eb9e761c3bea348d1fa5abb0')

prepare() {
  cd $srcdir/gcc-$pkgver

  # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
}

build() {
  cd $srcdir/gcc-$pkgver

  export CFLAGS="-O2 -pipe"
  export CXXFLAGS="-O2 -pipe"

  rm -rf build
  mkdir build
  cd build

  ../configure --prefix=/usr \
	--target=${_target} \
	--host=$CHOST \
	--build=$CHOST \
	--enable-shared --disable-nls \
        --enable-languages=c,c++ \
        --enable-multilib \
        --enable-interwork \
	--with-local-prefix=/usr/${CHOST}/${_target}/lib \
	--with-as=/usr/bin/${_target}-as \
        --with-ld=/usr/bin/${_target}-ld \
	--with-newlib \
	--with-float=soft \
	--with-sysroot=/usr/$CHOST/${_target}

  make all-gcc all-target-libgcc all-target-libstdc++-v3 || return 1
}

package() {
  cd $srcdir/gcc-$pkgver/build

  export CFLAGS="-O2 -pipe"
  export CXXFLAGS="-O2 -pipe"

  make DESTDIR=$pkgdir install-gcc install-target-libgcc install-target-libstdc++-v3 || return 1

  rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
  rm -f $pkgdir/usr/share/man/man7/gfdl.7*
  rm -f $pkgdir/usr/share/man/man7/gpl.7*
  rm -rf $pkgdir/usr/share/info
  rm -rf $pkgdir/usr/share/gcc-${pkgver}

  cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
  rm -rf $pkgdir/usr/libexec

  # strip it manually
  strip $pkgdir/usr/bin/* 2>/dev/null || true
  find $pkgdir/usr/lib -type f -exec ${_target}-strip --strip-debug --strip-unneeded {} \; 2>/dev/null || true
}


Create a new paste based on this one


Comments: