public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Pass -nostdlib -nostartfiles together with -r [BZ #31753]
@ 2024-05-18  3:00 H.J. Lu
  2024-05-19 19:24 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2024-05-18  3:00 UTC (permalink / raw)
  To: libc-alpha

Since -r in GCC 6/7/8 doesn't imply -nostdlib -nostartfiles, update the
link-static-libc.out rule to also pass -nostdlib -nostartfiles.  This
fixes BZ #31753.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index adf4749124..c84f266ce7 100644
--- a/Makefile
+++ b/Makefile
@@ -581,7 +581,8 @@ $(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh
 # definitions of any symbols.
 tests-special += $(objpfx)link-static-libc.out
 $(objpfx)link-static-libc.out:
-	$(LINK.o) $(whole-archive) -r $(objpfx)libc.a -o /dev/null > $@ 2>&1; \
+	$(LINK.o) $(whole-archive) -nostdlib -nostartfiles -r \
+	  $(objpfx)libc.a -o /dev/null > $@ 2>&1; \
 	$(evaluate-test)
 
 # Print test summary for tests in $1 .sum file;
-- 
2.45.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-19 19:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-18  3:00 [PATCH] Pass -nostdlib -nostartfiles together with -r [BZ #31753] H.J. Lu
2024-05-19 19:24 ` Florian Weimer

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).