[Bug driver/81358] libatomic not automatically linked with C11 code
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 18 11:37:29 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Prathamesh Kulkarni
<prathamesh3492@gcc.gnu.org>:
https://gcc.gnu.org/g:e2f6ed54f75bbf8dd0292af90304890f06a9be17
commit r15-6337-ge2f6ed54f75bbf8dd0292af90304890f06a9be17
Author: Prathamesh Kulkarni <prathameshk@nvidia.com>
Date: Wed Dec 18 17:03:51 2024 +0530
PR81358: Enable automatic linking of libatomic.
ChangeLog:
PR driver/81358
* Makefile.def: Add dependencies so libatomic is built before
target
libraries are configured.
* Makefile.tpl: Export TARGET_CONFIGDIRS.
* 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/gnu-user.h (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Use
LINK_LIBATOMIC_SPEC.
* doc/invoke.texi: Document -flink-libatomic.
* configure.ac: Define TARGET_PROVIDES_LIBATOMIC.
* configure: Regenerate.
* config.in: Regenerate.
libatomic/ChangeLog:
PR driver/81358
* Makefile.am: Pass -fno-link-libatomic.
New rule all.
* configure.ac: Assert that CFLAGS is set and pass
-fno-link-libatomic.
* Makefile.in: Regenerate.
* configure: Regenerate.
Signed-off-by: Prathamesh Kulkarni <prathameshk@nvidia.com>
Co-authored-by: Matthew Malcolmson <mmalcolmson@nvidia.com>
More information about the Gcc-bugs
mailing list