public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile
@ 2021-03-15 21:01 Carlos Eduardo Seo
  2021-03-19 18:01 ` Szabolcs Nagy
  2021-03-19 18:02 ` Florian Weimer
  0 siblings, 2 replies; 6+ messages in thread
From: Carlos Eduardo Seo @ 2021-03-15 21:01 UTC (permalink / raw)
  To: libc-alpha

Building dl-static is also needed when building glibc with --disable-shared.

Tested on aarch64-linux-gnu and powerpc64le-linux-gnu.
---
 sysdeps/unix/sysv/linux/aarch64/Makefile | 2 --
 sysdeps/unix/sysv/linux/arc/Makefile     | 2 --
 sysdeps/unix/sysv/linux/mips/Makefile    | 2 --
 sysdeps/unix/sysv/linux/powerpc/Makefile | 2 --
 4 files changed, 8 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile b/sysdeps/unix/sysv/linux/aarch64/Makefile
index 3f22f71bef..41b284df17 100644
--- a/sysdeps/unix/sysv/linux/aarch64/Makefile
+++ b/sysdeps/unix/sysv/linux/aarch64/Makefile
@@ -1,9 +1,7 @@
 ifeq ($(subdir),elf)
-ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
 endif
-endif
 
 ifeq ($(subdir),misc)
 sysdep_headers += sys/elf.h
diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
index 25d7bbecac..4a49f34088 100644
--- a/sysdeps/unix/sysv/linux/arc/Makefile
+++ b/sysdeps/unix/sysv/linux/arc/Makefile
@@ -13,11 +13,9 @@ sysdep_routines += cacheflush
 endif
 
 ifeq ($(subdir),elf)
-ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
 endif
-endif
 
 abi-variants := arcle arcbe
 
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 026ba242cf..805dd59bab 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -57,10 +57,8 @@ abi-n64_hard_2008-condition := defined(__mips_nan2008) \
 			       && (_MIPS_SIM == _MIPS_SIM_ABI64)
 
 ifeq ($(subdir),elf)
-ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-endif
 # If the compiler doesn't use GNU.stack note,
 # this test is expected to fail.
 ifneq ($(mips-has-gnustack),yes)
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index a093cda68b..c567d6782a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -13,10 +13,8 @@ gen-as-const-headers += ucontext_i.sym
 endif
 
 ifeq ($(subdir),elf)
-ifeq ($(build-shared),yes)
 # This is needed for DSO loading from static binaries.
 sysdep-dl-routines += dl-static
-endif
 # Otherwise tst-tls-dlinfo fails due to tst-tlsmod2.so using static tls.
 LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize
 endif
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-20  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 21:01 [PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile Carlos Eduardo Seo
2021-03-19 18:01 ` Szabolcs Nagy
2021-03-19 18:02 ` Florian Weimer
2021-03-30 20:45   ` Carlos Seo
2021-04-20  8:12   ` Szabolcs Nagy
2021-04-20  9:48     ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).