diff --git a/cross/gcc-aarch64/APKBUILD b/cross/gcc-aarch64/APKBUILD index 033177722..bb88d1f85 100644 --- a/cross/gcc-aarch64/APKBUILD +++ b/cross/gcc-aarch64/APKBUILD @@ -31,7 +31,7 @@ pkgver=11.2.1_git20220219 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-aarch64 -pkgrel=3 +pkgrel=4 pkgdesc="Stage2 cross-compiler for aarch64" url="https://gcc.gnu.org" arch="x86_64" @@ -182,10 +182,15 @@ if $LANG_FORTRAN; then _languages="$_languages,fortran" fi if $LANG_ADA; then - subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat" + subpackages="$subpackages gcc-gnat$_target:gnat" _languages="$_languages,ada" - [ "$CBUILD" = "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat-bootstrap" - [ "$CBUILD" != "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" + if [ "$CBUILD" = "$CTARGET" ]; then + makedepends_build="$makedepends_build gcc-gnat-bootstrap" + subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH" + else + subpackages="$subpackages libgnat::$CTARGET_ARCH" + makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" + fi fi if $LANG_JIT; then subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev" @@ -435,10 +440,12 @@ package() { mv "$i" "$pkgdir"/usr/lib/ ln -s ../../../../${i##*/} $i done - for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do - mv "$i" "$pkgdir"/usr/lib/ - ln -s ../../../../${i##*/} $i - done + if [ "$CHOST" = "$CTARGET" ]; then + for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do + mv "$i" "$pkgdir"/usr/lib/ + ln -s ../../../../${i##*/} $i + done + fi fi if [ "$CHOST" != "$CTARGET" ]; then diff --git a/cross/gcc-armv7/APKBUILD b/cross/gcc-armv7/APKBUILD index 4d1ec8f93..71e68b720 100644 --- a/cross/gcc-armv7/APKBUILD +++ b/cross/gcc-armv7/APKBUILD @@ -31,7 +31,7 @@ pkgver=11.2.1_git20220219 [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-armv7 -pkgrel=3 +pkgrel=4 pkgdesc="Stage2 cross-compiler for armv7" url="https://gcc.gnu.org" arch="x86_64" @@ -182,10 +182,15 @@ if $LANG_FORTRAN; then _languages="$_languages,fortran" fi if $LANG_ADA; then - subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat" + subpackages="$subpackages gcc-gnat$_target:gnat" _languages="$_languages,ada" - [ "$CBUILD" = "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat-bootstrap" - [ "$CBUILD" != "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" + if [ "$CBUILD" = "$CTARGET" ]; then + makedepends_build="$makedepends_build gcc-gnat-bootstrap" + subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH" + else + subpackages="$subpackages libgnat::$CTARGET_ARCH" + makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" + fi fi if $LANG_JIT; then subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev" @@ -435,10 +440,12 @@ package() { mv "$i" "$pkgdir"/usr/lib/ ln -s ../../../../${i##*/} $i done - for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do - mv "$i" "$pkgdir"/usr/lib/ - ln -s ../../../../${i##*/} $i - done + if [ "$CHOST" = "$CTARGET" ]; then + for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do + mv "$i" "$pkgdir"/usr/lib/ + ln -s ../../../../${i##*/} $i + done + fi fi if [ "$CHOST" != "$CTARGET" ]; then