summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-06-10 12:11:12 -0400
committerRich Felker <dalias@aerifal.cx>2014-06-10 12:11:12 -0400
commitd79b27785fb2476017225b13d24e4b8d408f61c6 (patch)
treeda5372de59327174610223396ffb204434906649 /configure
parentac31bf278d9ed855e6765bb71d64ed19d2b7c0f8 (diff)
downloadmusl-d79b27785fb2476017225b13d24e4b8d408f61c6.tar.gz
musl-d79b27785fb2476017225b13d24e4b8d408f61c6.tar.bz2
musl-d79b27785fb2476017225b13d24e4b8d408f61c6.tar.xz
musl-d79b27785fb2476017225b13d24e4b8d408f61c6.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure b/configure
index 03c193d9..0cff13d2 100755
--- a/configure
+++ b/configure
@@ -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