# Maintainer: Brad Fanella # Contributor: Corrado Primier # Contributor: danst0 pkgname=gcc-avr pkgver=4.5.2 pkgrel=1 pkgdesc="The GNU avr Compiler Collection" arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'custom') url="http://gcc.gnu.org/" depends=('binutils-avr>=2.21' 'cloog-ppl' 'gcc-libs>=4.5.2' 'libmpc' 'elfutils') options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') source=(http://ftp.gnu.org/gnu/gcc/${pkgname/-avr}-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 'add-more-mcus.patch') md5sums=('aa9e36bec080452372bfba793428ee82' '9821f1c61e43755866861485ff364e90' 'b2c3418c571f7c9b794dcf44eb186548') build() { export CFLAGS="-O2 -pipe" export CXXFLAGS="-O2 -pipe" cd "${srcdir}/${pkgname/-avr}-${pkgver}" # http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01210.html patch -p0 -i ${srcdir}/add-more-mcus.patch mkdir build cd build ../configure --disable-libssp \ --disable-nls \ --enable-languages=c,c++ \ --infodir=/usr/share/info \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --mandir=/usr/share/man \ --prefix=/usr \ --target=avr \ --with-gnu-as \ --with-gnu-ld \ --with-as=/usr/bin/avr-as \ --with-ld=/usr/bin/avr-ld make } package() { cd "${srcdir}/${pkgname/-avr}-${pkgver}" cd build make -j1 DESTDIR=${pkgdir} install rm -f ${pkgdir}/usr/lib/libiberty.a rm -rf ${pkgdir}/usr/share/man/man7 rm -rf ${pkgdir}/usr/share/info }