aboutsummaryrefslogtreecommitdiffstats
path: root/community/gcc-avr/APKBUILD
blob: dd2cf025ae00ea1a8dc2856991e76cdd3a9bbc4a (plain) (blame)
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
# Contributor: Pedro Filipe <xpecex@outlook.com>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=gcc-avr
pkgver=8.3.0
pkgrel=0
pkgdesc="The GNU Compiler Collection for AVR targets"
url="https://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.18
source="https://mirrors.kernel.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
	http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2"

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

build() {
	mkdir "$_workingdir"
	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
	make
}

package() {
	cd "$_workingdir"
	make install DESTDIR="$pkgdir"
	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 '{}' \;
}

sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802  gcc-8.3.0.tar.xz
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94  isl-0.18.tar.bz2"