Index: PKGBUILD =================================================================== --- PKGBUILD (revision 821000) +++ PKGBUILD (working copy) @@ -3,6 +3,9 @@ # Contributor: Martin Schmölzer _target=riscv64-elf + +_enable_ada=yes + pkgname=$_target-gcc pkgver=10.2.0 _islver=0.22 @@ -13,7 +16,8 @@ url='https://gcc.gnu.org/' license=(GPL LGPL FDL) depends=($_target-binutils zlib libmpc) -makedepends=(gmp mpfr $_target-newlib) +makedepends=(gmp mpfr $_target-newlib + $([[ "$_enable_ada" == "yes" ]] && echo "gcc-ada")) optdepends=("$_target-newlib: Standard C library optimized for embedded systems") options=(!emptydirs !strip) source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig} @@ -46,6 +50,12 @@ } build() { + + local _languages="c,c++" + if [ "$_enable_ada" == "yes" ]; then + _languages+=",ada" + fi + cd build-gcc export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' @@ -57,7 +67,7 @@ --with-sysroot=/usr/$_target \ --with-native-system-header-dir=/include \ --libexecdir=/usr/lib \ - --enable-languages=c,c++ \ + --enable-languages=${_languages} \ --enable-threads=single \ --enable-plugins \ --enable-multilib \ @@ -72,6 +82,7 @@ --disable-nls \ --disable-shared \ --disable-tls \ + --disable-libada \ --with-newlib \ --with-gnu-as \ --with-gnu-ld \ @@ -88,6 +99,11 @@ --with-bugurl='https://bugs.archlinux.org/' make + + if [[ "${_languages}" == *ada* ]]; then + make -C gcc cross-gnattools + make -C gcc ada.all.cross + fi } package() {