From: Carlos Eduardo Seo <carlos.seo@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile
Date: Mon, 15 Mar 2021 18:01:03 -0300 [thread overview]
Message-ID: <20210315210103.3040700-1-carlos.seo@linaro.org> (raw)
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
next reply other threads:[~2021-03-15 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 21:01 Carlos Eduardo Seo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210315210103.3040700-1-carlos.seo@linaro.org \
--to=carlos.seo@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).