summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xconfigure13
2 files changed, 5 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 7c3dda4b..b2a719db 100644
--- a/Makefile
+++ b/Makefile
@@ -159,8 +159,7 @@ obj/%.lo: $(srcdir)/%.c $(GENH) $(IMPH)
lib/libc.so: $(LOBJS) $(LDSO_OBJS)
$(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -nostdlib -shared \
- -Wl,-e,_dlstart -Wl,-Bsymbolic-functions \
- -o $@ $(LOBJS) $(LDSO_OBJS) $(LIBCC)
+ -Wl,-e,_dlstart -o $@ $(LOBJS) $(LDSO_OBJS) $(LIBCC)
lib/libc.a: $(AOBJS)
rm -f $@
diff --git a/configure b/configure
index a296f8ab..58f496e0 100755
--- a/configure
+++ b/configure
@@ -565,15 +565,10 @@ tryldflag LDFLAGS_AUTO -Wl,--no-undefined
# versions built without shared library support and pcc are broken.
tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL
-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
-}
-}
+# Linking with -Bsymbolic-functions is no longer mandatory for
+# the dynamic linker to work, but enable it if it works as
+# a linking optimization.
+tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions
# Find compiler runtime library
test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh