aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gcc-avr/APKBUILD
blob: 8f9cd2f03ddf53f2b1babc37fa8a9d97725a42b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=gcc-avr
pkgver=5.3.0
pkgrel=0
pkgdesc="The GNU Compiler Collection for AVR targets"
url="http://gcc.gnu.org"
depends="binutils-avr"
makedepends="bash linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev"
arch="all"
license="GPL LGPL"
subpackages="$pkgname-doc"
_islver=0.15
source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
	http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2"

builddir="$srcdir/gcc-$pkgver"
_workingdir="$builddir/build"

build() {
	mkdir "$_workingdir" || return 1
	cd "$_workingdir"

	# link isl for in-tree build
	ln -s "$srcdir"/isl-"$_islver" "$builddir"/isl

	export CFLAGS_FOR_TARGET='-pipe'
	export CXXFLAGS_FOR_TARGET='-pipe'

	"$builddir"/configure \
		--build="$CBUILD" \
		--target=avr \
		--prefix=/usr \
		--enable-languages=c,c++ \
		--enable-ld=default \
		--enable-__cxa_atexit \
		--disable-install-libiberty \
		--disable-libssp \
		--disable-libstdcxx-pch \
		--disable-libunwind-exceptions \
		--disable-linker-build-id \
		--disable-nls \
		--disable-werror \
		--libdir=/usr/lib \
		--libexecdir=/usr/lib \
		--with-as=/usr/bin/avr-as \
		--with-gnu-as \
		--with-gnu-ld \
		--with-ld=/usr/bin/avr-ld \
		--with-system-zlib \
		--with-isl || return 1
	make
}

package() {
	cd "$_workingdir"
	make install DESTDIR="$pkgdir" || return 1
	rm -rf "$pkgdir"/usr/share/man/man7
	rm -f "$pkgdir"/usr/lib/libcc1.*
	find "$pkgdir"/usr/lib -type f -name "*.a" -exec /usr/bin/avr-strip --strip-debug '{}' \;
}

md5sums="c9616fd448f980259c31de613e575719  gcc-5.3.0.tar.bz2
8428efbbc6f6e2810ce5c1ba73ecf98c  isl-0.15.tar.bz2"
sha256sums="b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db  gcc-5.3.0.tar.bz2
8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b  isl-0.15.tar.bz2"
sha512sums="d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a  gcc-5.3.0.tar.bz2
1e27b7798f7428abcb5e9b2e3fbe3842fede54c03bbd7bd3cf83703e1e4cca7d95c51326ab90253fe55b38c002183e8e78dfbb4d2cf20b0aabe02443c8e7d50f  isl-0.15.tar.bz2"