1
0
forked from aniani/vim

updated for version 7.3.050

Problem:    The link script is clumsy.
Solution:   Use the --as-needed linker option if available. (Kirill A.
            Shutemov)
This commit is contained in:
Bram Moolenaar
2010-11-03 22:32:24 +01:00
parent 2d0860d06c
commit 22e193ddd5
6 changed files with 56 additions and 3 deletions

18
src/auto/configure vendored
View File

@@ -593,6 +593,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LINK_AS_NEEDED
DEPEND_CFLAGS_FILTER
MAKEMO
MSGFMT
@@ -12404,6 +12405,23 @@ $as_echo "no" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
$as_echo_n "checking linker --as-needed support... " >&6; }
LINK_AS_NEEDED=
# Check if linker supports --as-needed and --no-as-needed options
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
LDFLAGS="$LDFLAGS -Wl,--as-needed"
LINK_AS_NEEDED=yes
fi
if test "$LINK_AS_NEEDED" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
cat >confcache <<\_ACEOF