[PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile
Carlos Eduardo Seo
carlos.seo@linaro.org
Mon Mar 15 21:01:03 GMT 2021
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
More information about the Libc-alpha
mailing list