Description: link libgnarl with libatomic on armel and sparc On other architectures, the library is ignored thanks to --as-needed. . Seen with 14-20240429-1 on armel: cd rts; [bla]/./gcc/xgcc [bla] -shared [bla] -o libgnarl-14.so [bla] /usr/bin/arm-linux-gnueabi-ld: libgnat-14.so: undefined reference to `__atomic_compare_exchange_8' /usr/bin/arm-linux-gnueabi-ld: libgnat-14.so: undefined reference to `__atomic_load_8' . Seen with 13.2.0-25 on sparc: checking fp.h usability... /usr/sparc-linux-gnu/bin/ld: libgnat-13.so: undefined reference to `__atomic_compare_exchange_8' . Libatomic becomes an artificial dependency for Ada in Makefile.def, so a better solution is welcome. . Autogen should refresh src/Makefile.in from src/Makefile.{def,tpl} at build time, but we do not want to Build-Depend: guile. # export QUILT_PATCHES=debian/patches # quilt pop $this.diff # quilt add src/Makefile.in # (cd src && autogen Makefile.def) # quilt refresh --no-timestamps --no-index -pab # quilt push -a . The issue is hidden without -Wl,--no-allow-shlib-undefined. (ada-gnattools-cross.diff adds checking options to LDFLAGS, then adds LDFLAGS to the command line). Bug-Debian: https://bugs.debian.org/861734 Bug-Debian: https://bugs.debian.org/1072071 Author: Matthias Klose Author: Nicolas Boulenguez --- a/src/gcc/ada/Makefile.rtl +++ b/src/gcc/ada/Makefile.rtl @@ -2302,6 +2302,7 @@ endif # ARM linux, GNU eabi ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),) + MISCLIB = ../../../$(target_alias)/libatomic/.libs/libatomic.so LIBGNAT_TARGET_PAIRS = \ a-intnam.ads