]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Pass -nostdlib -nostartfiles together with -r [BZ #31753]
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 18 May 2024 03:00:38 +0000 (20:00 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 19 May 2024 23:29:02 +0000 (16:29 -0700)
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>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Makefile

index adf47491240b85ef2193823072b6ce5e500ccc5f..c84f266ce74f04a6d36ca7c6e7a37b70d1d51891 100644 (file)
--- 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;