]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use $(DEFAULT-LDFLAGS-$(@F)) in +link-static-before-libc
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 00:15:50 +0000 (17:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 00:16:04 +0000 (17:16 -0700)
Use $(LDFLAGS-$(@F)) with tst-tls1-static-non-pie may not be sufficient
when static PIE is built by default.  Use $(DEFAULT-LDFLAGS-$(@F)) in
+link-static-before-libc to make sure that tst-tls1-static-non-pie is
always built as non-PIE static executable and make sure that crt1.o is
used with tst-tls1-static-non-pie.

* Makeconfig (+link-static-before-libc): Use
$(DEFAULT-LDFLAGS-$(@F)).
* elf/Makefile (CRT-tst-tls1-static-non-pie): New.
(LDFLAGS-tst-tls1-static-non-pie): Renamed to ...
(DEFAULT-LDFLAGS-tst-tls1-static-non-pie): This.

ChangeLog
Makeconfig
elf/Makefile

index 6f1b3ceaa2f6922265847d4b1703120acac2ab96..191dd5aab3d8a30296ded6f5d77b2d9d16e315ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-10-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * Makeconfig (+link-static-before-libc): Use
+       $(DEFAULT-LDFLAGS-$(@F)).
+       * elf/Makefile (CRT-tst-tls1-static-non-pie): New.
+       (LDFLAGS-tst-tls1-static-non-pie): Renamed to ...
+       (DEFAULT-LDFLAGS-tst-tls1-static-non-pie): This.
+
 2017-10-04  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf/Makefile (tests): Add tst-main1.
index b51904b7973e508e49ab87a8678c8fd3f9cba9a5..0ceff92a3dffb36f76dd78be339f8d9f0af761b1 100644 (file)
@@ -435,6 +435,7 @@ endif
 # Command for statically linking programs with the C library.
 ifndef +link-static
 +link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
+             $(DEFAULT-LDFLAGS-$(@F)) \
              $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F))  \
              $(addprefix $(csu-objpfx),$(static-start-installed-name)) \
              $(+preinit) $(+prectorT) \
index 0dcbf2f3de2457664f6266d60a0f63b6e4a2f5fd..a31fb72498a7a1c1978b5af0fcdd9bbf8f7cbf85 100644 (file)
@@ -152,7 +152,8 @@ tests-static-internal := tst-tls1-static tst-tls2-static \
               tst-ptrguard1-static tst-stackguard1-static \
               tst-tls1-static-non-pie
 
-LDFLAGS-tst-tls1-static-non-pie = $(no-pie-ldflag)
+CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
+DEFAULT-LDFLAGS-tst-tls1-static-non-pie = $(no-pie-ldflag)
 
 tests := tst-tls9 tst-leaks1 \
        tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \