1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/gcc-avr/APKBUILD
Marian Buschsieweke 3e96627e41 community/gcc-avr: fix paths & other issues
- change path of toolchain to /usr/avr/{lib,include} to match binutils
- compile with --with-avrlibc
    - add patch to avoid stage-1 packages of gcc and avrlibc, as this
      for AVR not needed
- fix license specifier
- use system isl
2021-04-15 07:56:36 +00:00

64 lines
1.8 KiB
Text

# Contributor: Pedro Filipe <xpecex@outlook.com>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=gcc-avr
pkgver=10.2.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 isl-dev"
arch="all"
license="GPL-3.0-or-later"
subpackages="$pkgname-doc"
source="
https://mirrors.kernel.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
fix-no-system-headers.patch
"
builddir="$srcdir/gcc-$pkgver"
_workingdir="$builddir/build"
build() {
mkdir "$_workingdir"
cd "$_workingdir"
export CFLAGS_FOR_TARGET='-pipe'
export CXXFLAGS_FOR_TARGET='-pipe'
"$builddir"/configure \
--target=avr \
--prefix=/usr \
--with-sysroot=/usr/avr \
--with-native-system-header-dir=/include \
--with-headers=/usr/avr/include \
--with-python-dir=share/gcc-avr \
--libexecdir=/usr/lib \
--enable-languages=c,c++ \
--enable-__cxa_atexit \
--disable-install-libiberty \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
--disable-linker-build-id \
--disable-nls \
--disable-werror \
--with-gnu-as \
--with-gnu-ld \
--with-system-zlib \
--with-isl \
--with-avrlibc \
--with-pkgversion='Alpine Linux'
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="42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e gcc-10.2.0.tar.xz
358cb41e6a8612f5c96f27ed573354a909253565caa200af8959d90cf21e0ddbee219f6281fc3917ead1f85c5ec7111162f9b075c3e478df56a2fad505bce5f1 fix-no-system-headers.patch"