aboutsummaryrefslogtreecommitdiff
path: root/libatomic/Makefile.in
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathameshk@nvidia.com>2024-12-18 17:03:51 +0530
committerPrathamesh Kulkarni <prathameshk@nvidia.com>2024-12-18 17:03:51 +0530
commite2f6ed54f75bbf8dd0292af90304890f06a9be17 (patch)
tree0be43e527612a09ffe964de04ff0a9f17d180a5b /libatomic/Makefile.in
parent12dd892b1a3ad719e76e6ca40f8cbc224610b849 (diff)
downloadgcc-e2f6ed54f75bbf8dd0292af90304890f06a9be17.zip
gcc-e2f6ed54f75bbf8dd0292af90304890f06a9be17.tar.gz
gcc-e2f6ed54f75bbf8dd0292af90304890f06a9be17.tar.bz2
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>
Diffstat (limited to 'libatomic/Makefile.in')
-rw-r--r--libatomic/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
index 9798e7c..f19e0a3 100644
--- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in
@@ -421,7 +421,7 @@ libatomic_version_info = -version-info $(libtool_VERSION)
@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wc,-nodefaultrpaths \
@ENABLE_DARWIN_AT_RPATH_TRUE@ -Wl,-rpath,@loader_path
libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \
- $(lt_host_flags) $(libatomic_darwin_rpath)
+ -Wc,-fno-link-libatomic $(lt_host_flags) $(libatomic_darwin_rpath)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c \
init.c fenv.c fence.c flag.c $(am__append_5)
@@ -458,6 +458,7 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
libatomic_convenience_la_SOURCES = $(libatomic_la_SOURCES)
libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD)
+gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
@@ -901,6 +902,9 @@ vpath % $(strip $(search_path))
# makefile fragments to avoid broken *.Ppo getting included into the Makefile
# when it is reloaded during the build of all-multi.
all-multi: $(libatomic_la_LIBADD)
+all: all-multi libatomic.la
+ $(INSTALL_DATA) .libs/libatomic.a $(gcc_objdir)/
+ chmod 644 $(gcc_objdir)/libatomic.a
# target overrides
-include $(tmake_file)