mirror of https://git.musl-libc.org/git/musl
fail configure on --enable-shared if -Bsymbolic-functions doesn't work
previously, a warning was issued in this case no matter what, even if --disable-shared was used. now, the default for --enable-shared is changed from "yes" to "auto", and the warning is issued by default, but becomes an error if --enable-shared is used, and the test is suppressed completely if --disable-shared is used.
This commit is contained in:
parent
ac31bf278d
commit
d79b27785f
|
@ -123,7 +123,7 @@ target=
|
|||
optimize=auto
|
||||
debug=no
|
||||
warnings=no
|
||||
shared=yes
|
||||
shared=auto
|
||||
static=yes
|
||||
wrapper=auto
|
||||
|
||||
|
@ -412,12 +412,15 @@ fi
|
|||
tryflag CFLAGS_AUTO -fno-stack-protector
|
||||
tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
|
||||
|
||||
test "$shared" = "no" || {
|
||||
# Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions
|
||||
LDFLAGS_DUMMY=
|
||||
tryldflag LDFLAGS_DUMMY -Wl,-Bsymbolic-functions || {
|
||||
test "$shared" = "yes" && fail "$0: error: linker cannot build shared library"
|
||||
printf "warning: disabling dynamic linking support\n"
|
||||
shared=no
|
||||
}
|
||||
}
|
||||
|
||||
# Find compiler runtime library
|
||||
test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
|
||||
|
|
Loading…
Reference in New Issue