https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
--- Comment #34 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Prathamesh Kulkarni <[email protected]>: https://gcc.gnu.org/g:e63cf4b130b86dd7dde1bf499d3d40faca10ea2e commit r16-4315-ge63cf4b130b86dd7dde1bf499d3d40faca10ea2e Author: Prathamesh Kulkarni <[email protected]> Date: Thu Oct 9 07:07:24 2025 +0000 PR81358: Enable automatic linking of libatomic. ChangeLog: PR driver/81358 * Makefile.def: Add no_atomic=true for libraries that don't depend on libatomic. * Makefile.tpl: Export TARGET_CONFIGDIRS and create rule to add dependencies for libatomic. * configure.ac: Add libatomic to bootstrap_target_libs. * Makefile.in: Regenerate. * configure: Regenerate. gcc/ChangeLog: PR driver/81358 * common.opt: New option -flink-libatomic. * gcc.cc (LINK_LIBATOMIC_SPEC): New macro. * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Use LINK_LIBATOMIC_SPEC. * config/arm/uclinux-elf.h: Likewise. * config/arm/unknown-elf.h: Likewise. * config/avr/avrlibc.h: Likewise. * config/bfin/linux.h: Likewise. * config/darwin.h: Likewise. * config/gnu-user.h: Likewise. * config/lm32/uclinux-elf.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rtems.h: Likewise. * config/sparc/sparc.h: Likewise. * doc/invoke.texi: Document -flink-libatomic. * configure.ac: Define TARGET_PROVIDES_LIBATOMIC. * configure: Regenerate. * config.in: Regenerate. * common.opt.urls: Regenerate. libatomic/ChangeLog: PR driver/81358 * Makefile.am: Pass -fno-link-libatomic. New rule all-local. * configure.ac: Assert that CFLAGS is set and pass -fno-link-libatomic. Use __libatomic_save_CFLAGS__ instead of save_CFLAGS. * Makefile.in: Regenerate. * configure: Regenerate. Signed-off-by: Prathamesh Kulkarni <[email protected]> Co-authored-by: Matthew Malcolmson <[email protected]>
