mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
patch 8.2.2852: configure can add --as-needed a second time
Problem: Configure can add --as-needed a second time.
Solution: Only add --as-needed if not already there. (Natanael Copa,
closes #8189, closes #8181)
This commit is contained in:
committed by
Bram Moolenaar
parent
847fe7d750
commit
761ead497f
4
src/auto/configure
vendored
4
src/auto/configure
vendored
@@ -14937,7 +14937,9 @@ $as_echo_n "checking linker --as-needed support... " >&6; }
|
|||||||
LINK_AS_NEEDED=
|
LINK_AS_NEEDED=
|
||||||
# Check if linker supports --as-needed and --no-as-needed options
|
# Check if linker supports --as-needed and --no-as-needed options
|
||||||
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
|
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
|
||||||
LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
|
if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--as-needed"
|
||||||
|
fi
|
||||||
LINK_AS_NEEDED=yes
|
LINK_AS_NEEDED=yes
|
||||||
fi
|
fi
|
||||||
if test "$LINK_AS_NEEDED" = yes; then
|
if test "$LINK_AS_NEEDED" = yes; then
|
||||||
|
|||||||
@@ -4519,7 +4519,9 @@ AC_MSG_CHECKING(linker --as-needed support)
|
|||||||
LINK_AS_NEEDED=
|
LINK_AS_NEEDED=
|
||||||
# Check if linker supports --as-needed and --no-as-needed options
|
# Check if linker supports --as-needed and --no-as-needed options
|
||||||
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
|
if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
|
||||||
LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
|
if ! echo "$LDFLAGS" | grep -q -- '-Wl,[[^[:space:]]]*--as-needed'; then
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--as-needed"
|
||||||
|
fi
|
||||||
LINK_AS_NEEDED=yes
|
LINK_AS_NEEDED=yes
|
||||||
fi
|
fi
|
||||||
if test "$LINK_AS_NEEDED" = yes; then
|
if test "$LINK_AS_NEEDED" = yes; then
|
||||||
|
|||||||
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2852,
|
||||||
/**/
|
/**/
|
||||||
2851,
|
2851,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user