提交 2462370b 编写于 作者: R Rich Felker

try to suppress linking libc.so if there are undefined symbols

this is always an error and usually results from failure to find/link
the compiler runtime library, but it could also result from
implementation errors in libc, using functions that don't (yet) exist.
either way the resulting libc.so will crash mysteriously at runtime.
the crash happens too early to produce a meaningful error, so these
crashes are very confusing to users and waste a lot of debugging time.
this commit should ensure that they do not happen.
上级 c42650ab
...@@ -499,6 +499,12 @@ fi ...@@ -499,6 +499,12 @@ fi
# Some patched GCC builds have these defaults messed up... # Some patched GCC builds have these defaults messed up...
tryldflag LDFLAGS_AUTO -Wl,--hash-style=both tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
# Prevent linking if there are undefined symbols; if any exist,
# libc.so will crash at runtime during relocation processing.
# The common way this can happen is failure to link the compiler
# runtime library; implementation error is also a possibility.
tryldflag LDFLAGS_AUTO -Wl,--no-undefined
test "$shared" = "no" || { test "$shared" = "no" || {
# Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions # Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions
LDFLAGS_DUMMY= LDFLAGS_DUMMY=
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册