about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makeconfig1
-rw-r--r--elf/Makefile3
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f1b3ceaa2..191dd5aab3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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.
 	(modules-names): Add tst-main1mod.
 	($(objpfx)tst-main1): New.
diff --git a/Makeconfig b/Makeconfig
index b51904b797..0ceff92a3d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -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) \
diff --git a/elf/Makefile b/elf/Makefile
index 0dcbf2f3de..a31fb72498 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -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 \