This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix tst-tls9-static build


Hi all,

This patch fixes the tst-tlsmod[5/6].so build in system that uses -Wl,--as-needed
as default in linker option.  Without this option the testing shared library that
does not have libc.so in DT_NEEDED and the tst-tls9-static fails in architecture
that use the ./sysdeps/unix/sysv/linux/<arch>/dl-static.c trick.

Checked on powerpc64/powerpc64le. Ok to install?

PS: Based on this I am reviewing the dl-static trick, since it seems it not really
required on powerpc and I think based on newer kernel requirements that it might be
true to other archs that use the same trick (aarch64, tile, ia64, m64k, and mips).

--

	* elf/Makefile (tst-tlsmod5.so): Add $(no-as-needed).
	(tst-tlsmod6.so): Likewise.

---



diff --git a/elf/Makefile b/elf/Makefile
index 3d675d7..084abca 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -521,8 +521,8 @@ LDFLAGS-tst-initordera2.so = $(no-as-needed)
 LDFLAGS-tst-initordera3.so = $(no-as-needed)
 LDFLAGS-tst-initordera4.so = $(no-as-needed)
 LDFLAGS-tst-initorderb2.so = $(no-as-needed)
-LDFLAGS-tst-tlsmod5.so = -nostdlib
-LDFLAGS-tst-tlsmod6.so = -nostdlib
+LDFLAGS-tst-tlsmod5.so = -nostdlib $(no-as-needed)
+LDFLAGS-tst-tlsmod6.so = -nostdlib $(no-as-needed)
 
 testobj1.so-no-z-defs = yes
 testobj3.so-no-z-defs = yes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]