aboutsummaryrefslogtreecommitdiff
path: root/support/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-03-21 21:40:28 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-03-21 21:40:28 +0100
commit5dfbc3c43ecc1bcfc760a032c91bb002660051bc (patch)
treea498a5d06fca71b7c25d3a73c6367aab0be237f0 /support/Makefile
parent2f8e8c9cb72c0f479bd4f9249ef681fe4f36d280 (diff)
downloadglibc-5dfbc3c43ecc1bcfc760a032c91bb002660051bc.tar.xz
glibc-5dfbc3c43ecc1bcfc760a032c91bb002660051bc.zip
support: Link links-dso-program-c with libgcc_s only if available
Add a configure check to detect bootstrapping builds that do not have libgcc_s. Fixes commit 3e2be87832781a29ed67f38f87c1ce3dd4c1b866 ("support: Link links-dso-program-c against libgcc_s"). Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'support/Makefile')
-rw-r--r--support/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/support/Makefile b/support/Makefile
index 0c670555ae..ea7b4cd4a0 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -282,7 +282,10 @@ CFLAGS-temp_file.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
CFLAGS-links-dso-program-c.c += -fexceptions
-LDLIBS-links-dso-program-c = -lgcc -lgcc_s $(libunwind)
+LDLIBS-links-dso-program-c = -lgcc
+ifeq ($(have-libgcc_s),yes)
+LDLIBS-links-dso-program-c += -lgcc_s $(libunwind)
+endif
else
LINKS_DSO_PROGRAM = links-dso-program
LDLIBS-links-dso-program = -lstdc++ -lgcc -lgcc_s $(libunwind)