aboutsummaryrefslogtreecommitdiff
path: root/libatomic
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathameshk@nvidia.com>2024-12-18 22:03:38 +0530
committerPrathamesh Kulkarni <prathameshk@nvidia.com>2024-12-18 22:03:38 +0530
commit17d8a3da25cd5262df1075b210cb4fa707c527df (patch)
tree85efc9fda0ab79a5bd350f73237ae218bf26eb09 /libatomic
parent15dbb0a9ee8317c2a1983793d532c1f814ae1e33 (diff)
downloadgcc-17d8a3da25cd5262df1075b210cb4fa707c527df.zip
gcc-17d8a3da25cd5262df1075b210cb4fa707c527df.tar.gz
gcc-17d8a3da25cd5262df1075b210cb4fa707c527df.tar.bz2
Revert "PR81358: Enable automatic linking of libatomic."
This reverts commit e2f6ed54f75bbf8dd0292af90304890f06a9be17.
Diffstat (limited to 'libatomic')
-rw-r--r--libatomic/Makefile.am7
-rw-r--r--libatomic/Makefile.in6
-rwxr-xr-xlibatomic/configure29
-rw-r--r--libatomic/configure.ac25
4 files changed, 14 insertions, 53 deletions
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
index 723e0be..efadd9d 100644
--- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am
@@ -69,7 +69,7 @@ libatomic_darwin_rpath += -Wl,-rpath,@loader_path
endif
libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) \
- -Wc,-fno-link-libatomic $(lt_host_flags) $(libatomic_darwin_rpath)
+ $(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
@@ -162,11 +162,6 @@ libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD)
# when it is reloaded during the build of all-multi.
all-multi: $(libatomic_la_LIBADD)
-gcc_objdir = $(MULTIBUILDTOP)../../$(host_subdir)/gcc
-all: all-multi libatomic.la
- $(INSTALL_DATA) .libs/libatomic.a $(gcc_objdir)/
- chmod 644 $(gcc_objdir)/libatomic.a
-
# target overrides
-include $(tmake_file)
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
index f19e0a3..9798e7c 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) \
- -Wc,-fno-link-libatomic $(lt_host_flags) $(libatomic_darwin_rpath)
+ $(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,7 +458,6 @@ 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 =
@@ -902,9 +901,6 @@ 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)
diff --git a/libatomic/configure b/libatomic/configure
index 0a34027..d579bab 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -3415,26 +3415,6 @@ esac
# the wrong, non-multilib-adjusted value will be used in multilibs.
# As a side effect, we have to subst CFLAGS ourselves.
-# AC_PROG_CC sets CFLAGS to "-g -O2" by default (if unset), and
-# then compile conftests with default CFLAGS, leaving no place to temporarily
-# modify CFLAGS and restore them later. However we need to pass
-# -fno-link-libatomic in CFLAGS so conftests compiled in AC_PROG_CC don't fail.
-# Assert that CFLAGS is always set by user so the default setting of CFLAGS by
-# AC_PROG_CC won't be applicable anyway.
-if test -z "${CFLAGS}"; then
- as_fn_error $? "CFLAGS must be set." "$LINENO" 5
-fi
-
-# In order to override CFLAGS_FOR_TARGET, all of our special flags go
-# in XCFLAGS. But we need them in CFLAGS during configury. So put them
-# in both places for now and restore CFLAGS at the end of config.
-save_CFLAGS="$CFLAGS"
-
-# Append -fno-link-libatomic to avoid automatically linking libatomic,
-# while building libatomic itself.
-XCFLAGS="$XCFLAGS -fno-link-libatomic"
-CFLAGS="$save_CFLAGS $XCFLAGS"
-
ac_ext=c
@@ -4613,6 +4593,11 @@ fi
+# In order to override CFLAGS_FOR_TARGET, all of our special flags go
+# in XCFLAGS. But we need them in CFLAGS during configury. So put them
+# in both places for now and restore CFLAGS at the end of config.
+save_CFLAGS="$CFLAGS"
+
# Find other programs we need.
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
@@ -11471,7 +11456,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11474 "configure"
+#line 11459 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11577,7 +11562,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11580 "configure"
+#line 11565 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/libatomic/configure.ac b/libatomic/configure.ac
index 23a9695..32a2cdb 100644
--- a/libatomic/configure.ac
+++ b/libatomic/configure.ac
@@ -129,26 +129,6 @@ AC_SUBST(toolexeclibdir)
# the wrong, non-multilib-adjusted value will be used in multilibs.
# As a side effect, we have to subst CFLAGS ourselves.
-# AC_PROG_CC sets CFLAGS to "-g -O2" by default (if unset), and
-# then compile conftests with default CFLAGS, leaving no place to temporarily
-# modify CFLAGS and restore them later. However we need to pass
-# -fno-link-libatomic in CFLAGS so conftests compiled in AC_PROG_CC don't fail.
-# Assert that CFLAGS is always set by user so the default setting of CFLAGS by
-# AC_PROG_CC won't be applicable anyway.
-if test -z "${CFLAGS}"; then
- AC_MSG_ERROR([CFLAGS must be set.])
-fi
-
-# In order to override CFLAGS_FOR_TARGET, all of our special flags go
-# in XCFLAGS. But we need them in CFLAGS during configury. So put them
-# in both places for now and restore CFLAGS at the end of config.
-save_CFLAGS="$CFLAGS"
-
-# Append -fno-link-libatomic to avoid automatically linking libatomic,
-# while building libatomic itself.
-XCFLAGS="$XCFLAGS -fno-link-libatomic"
-CFLAGS="$save_CFLAGS $XCFLAGS"
-
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
@@ -157,6 +137,11 @@ m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
+# In order to override CFLAGS_FOR_TARGET, all of our special flags go
+# in XCFLAGS. But we need them in CFLAGS during configury. So put them
+# in both places for now and restore CFLAGS at the end of config.
+save_CFLAGS="$CFLAGS"
+
# Find other programs we need.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(NM, nm)