Mercurial > vim
diff src/auto/configure @ 2629:1ccc1ace9e5b v7.3.050
updated for version 7.3.050
Problem: The link script is clumsy.
Solution: Use the --as-needed linker option if available. (Kirill A.
Shutemov)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 03 Nov 2010 22:32:24 +0100 |
parents | 5c4b2fc4f067 |
children | b803b2776880 |
line wrap: on
line diff
--- a/src/auto/configure +++ b/src/auto/configure @@ -593,6 +593,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +LINK_AS_NEEDED DEPEND_CFLAGS_FILTER MAKEMO MSGFMT @@ -12404,6 +12405,23 @@ if test "$GCC" = yes; then 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