From 8e4beff0230b99d492f6708918caaec0f1cc1359 Mon Sep 17 00:00:00 2001 From: Stefan Biereigel Date: Sat, 3 Dec 2022 22:41:18 +0100 Subject: [PATCH] enable gcc-ada --- core/gcc/PKGBUILD | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD index 153b5ab597..861092e156 100644 --- a/core/gcc/PKGBUILD +++ b/core/gcc/PKGBUILD @@ -8,8 +8,6 @@ # NOTE: libtool requires rebuilt with each new gcc version # ALARM: Kevin Mihelich -# - removed ada packages -# - removed gnat (ada stuff) from gcc packaging # - disabled make check, too much stress, kills plugs :( # - specifid build host, disabled distcc # - replaced bugurl with our GitHub issue page @@ -17,7 +15,7 @@ noautobuild=1 -pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-go gcc-d lto-dump libgccjit) +pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go gcc-d lto-dump libgccjit) pkgver=12.2.0 _majorver=${pkgver%%.*} _commit=2ee5e4300186a92ad73f1a1a64cb918dc76c8d67 @@ -131,7 +129,7 @@ build() { CXXFLAGS=${CXXFLAGS/-Werror=format-security/} "$srcdir/gcc/configure" \ - --enable-languages=c,c++,fortran,go,lto,objc,obj-c++,d \ + --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \ --enable-bootstrap \ "${_confflags[@]:?_confflags unset}" @@ -273,7 +271,7 @@ package_gcc() { make -C gcc DESTDIR="$pkgdir" install-man install-info rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,lto-dump,gdc}.1 - rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gdc}.info + rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn,gdc}.info make -C libcpp DESTDIR="$pkgdir" install make -C gcc DESTDIR="$pkgdir" install-po @@ -332,6 +330,32 @@ package_gcc-objc() { "$pkgdir/usr/share/licenses/$pkgname/" } +package_gcc-ada() { + pkgdesc='Ada front-end for GCC (GNAT) (git version)' + depends=("gcc=$pkgver-$pkgrel" libisl.so) + + cd gcc-build/gcc + make DESTDIR="$pkgdir" ada.install-{common,info} + install -m755 gnat1 "$pkgdir/${_libdir}" + + cd "$srcdir"/gcc-build/$CHOST/libada + make DESTDIR="${pkgdir}" INSTALL="install" \ + INSTALL_DATA="install -m644" install-libada + + ln -s gcc "$pkgdir/usr/bin/gnatgcc" + + # insist on dynamic linking, but keep static libraries because gnatmake complains + mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib" + ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib/libgnarl.so" + ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib/libgnat.so" + rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so + + # Install Runtime Library Exception + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \ + "$pkgdir/usr/share/licenses/$pkgname/" +} + package_gcc-go() { pkgdesc='Go front-end for GCC' depends=("gcc=$pkgver-$pkgrel" libisl.so)