void-packages/srcpkgs/avr-gcc/template

70 lines
1.6 KiB
Bash
Raw Normal View History

2015-01-16 13:14:43 +00:00
# Template build file for 'avr-gcc'
pkgname=avr-gcc
version=4.9.2
revision=1
short_desc="The GNU C Compiler for AVR"
maintainer="allan <mail@may.mooo.com>"
homepage="http://gcc.gnu.org"
license="GFDL-1.2, GPL-3, LGPL-2.1"
distfiles="$GNU_SITE/gcc/gcc-$version/gcc-$version.tar.bz2"
checksum=2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd
wrksrc="gcc-$version"
only_for_archs="i686 x86_64"
hostmakedepends="avr-binutils zlib-devel libmpc-devel cloog-devel gmp-devel mpfr-devel"
depends="avr-binutils"
nostrip=yes
do_configure() {
mkdir obj-avr
cd obj-avr
export CFLAGS="-O2 -pipe"
2015-01-16 13:14:43 +00:00
CONFIG_SHELL=/bin/bash ../configure \
--disable-install-libiberty \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
--disable-linker-build-id \
--disable-nls \
--disable-werror \
--enable-__cxa_atexit \
--enable-checking=release \
--enable-clocale=gnu \
--enable-cloog-backend=isl \
--enable-gnu-unique-object \
--enable-gold \
--enable-languages=c,c++ \
--enable-ld=default \
--enable-lto \
--enable-plugin \
--enable-shared \
--prefix=/usr \
--target=avr \
--with-gnu-as \
--with-as=/usr/bin/avr-as \
--with-gnu-ld \
--with-ld=/usr/bin/avr-ld \
--with-plugin-ld=ld.gold \
--with-system-zlib \
--without-included-gettext
}
do_build() {
cd obj-avr
make ${makejobs}
}
do_install() {
cd obj-avr
make DESTDIR="$DESTDIR" install
}
post_install() {
rm -rf "$DESTDIR"/usr/share/man/man7
rm -rf "$DESTDIR"/usr/share/info
find "$DESTDIR"/usr/lib -type f -name "*.a" \
-exec avr-strip --strip-debug {} \;
}