mirror of
https://https.git.savannah.gnu.org/git/libtool.git
synced 2026-01-26 15:39:10 +00:00
libtool: port to GNU grep 3.8
GNU grep 3.8 warns about some regular expressions that POSIX says have undefined effect, e.g., '\-'. Unfortunately Libtool uses regular expressions of this form. Some unittests now fail, e.g. link-order.at: --- /dev/null +++ .../libtool/tests/testsuite.dir/at-groups/66/stderr @@ -0,0 +1,4 @@ +/bin/grep: warning: stray \ before / +/bin/grep: warning: stray \ before / +/bin/grep: warning: stray \ before / +/bin/grep: warning: stray \ before / Url: https://savannah.gnu.org/patch/index.php?10282 * m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Do not use \- in a BRE or ERE, as this produces undefined results that GNU grep 3.8 warns about. Use [-] instead. * tests/link-order.at (Link order test): Similarly, do not use \/ in an ERE; use / instead.
This commit is contained in:
parent
ad06c50b00
commit
eb2a21cf2e
12
m4/libtool.m4
vendored
12
m4/libtool.m4
vendored
@ -6442,7 +6442,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
GXX=no
|
||||
@ -6818,7 +6818,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@ -6883,7 +6883,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@ -7222,7 +7222,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
@ -7306,7 +7306,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
else
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@ -7317,7 +7317,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "[[-]]L"'
|
||||
fi
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||
|
||||
@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax
|
||||
case $hardcode_direct$hardcode_direct_absolute in
|
||||
yesno)
|
||||
AT_CHECK([if $EGREP relinking stderr; then
|
||||
$EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
|
||||
$EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
|
||||
else :; fi], [0], [ignore], [], [echo "wrong link order"])
|
||||
;;
|
||||
*)
|
||||
AT_CHECK([if $EGREP relinking stderr; then
|
||||
$EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
|
||||
$EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
|
||||
else :; fi], [0], [ignore], [], [echo "wrong link order"])
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user