Backport link test fix from upstream Libtool:
* libltdl.m4 (_LT_SYS_DYNAMIC_LINKER, _LT_LINKER_SHLIBS): Add cache variables to tests that require the linker to work. For shlibpath_overrides_runpath, this also changes the semantics to let the result from the C compiler take precedence. compiler take precedence. binutils/ * configure: Regenerate. opcodes/ * configure: Regenerate. bfd/ * configure: Regenerate. gas/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate.
This commit is contained in:
parent
a4fc1198a4
commit
ca19de342d
|
@ -2454,16 +2454,21 @@ linux* | k*bsd*-gnu)
|
||||||
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
shlibpath_overrides_runpath=no
|
shlibpath_overrides_runpath=no
|
||||||
|
|
||||||
# Some binutils ld are patched to set DT_RUNPATH
|
# Some binutils ld are patched to set DT_RUNPATH
|
||||||
|
AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
|
||||||
|
[lt_cv_shlibpath_overrides_runpath=no
|
||||||
save_LDFLAGS=$LDFLAGS
|
save_LDFLAGS=$LDFLAGS
|
||||||
save_libdir=$libdir
|
save_libdir=$libdir
|
||||||
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
|
eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
|
||||||
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
|
LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
|
||||||
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
|
[AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
|
||||||
[shlibpath_overrides_runpath=yes])])
|
[lt_cv_shlibpath_overrides_runpath=yes])])
|
||||||
LDFLAGS=$save_LDFLAGS
|
LDFLAGS=$save_LDFLAGS
|
||||||
libdir=$save_libdir
|
libdir=$save_libdir
|
||||||
|
])
|
||||||
|
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
|
||||||
|
|
||||||
# This implies no fast_install, which is unacceptable.
|
# This implies no fast_install, which is unacceptable.
|
||||||
# Some rework will be needed to allow for fast_install
|
# Some rework will be needed to allow for fast_install
|
||||||
|
@ -5111,8 +5116,9 @@ x|xyes)
|
||||||
# Test whether the compiler implicitly links with -lc since on some
|
# Test whether the compiler implicitly links with -lc since on some
|
||||||
# systems, -lgcc has to come before -lc. If gcc already passes -lc
|
# systems, -lgcc has to come before -lc. If gcc already passes -lc
|
||||||
# to ld, don't add -lc before -lgcc.
|
# to ld, don't add -lc before -lgcc.
|
||||||
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
|
AC_CACHE_CHECK([whether -lc should be explicitly linked in],
|
||||||
$RM conftest*
|
[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
|
||||||
|
[$RM conftest*
|
||||||
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
||||||
|
|
||||||
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
|
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
|
||||||
|
@ -5131,16 +5137,17 @@ x|xyes)
|
||||||
_LT_TAGVAR(allow_undefined_flag, $1)=
|
_LT_TAGVAR(allow_undefined_flag, $1)=
|
||||||
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
|
if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
|
||||||
then
|
then
|
||||||
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||||
else
|
else
|
||||||
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
|
lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
|
||||||
fi
|
fi
|
||||||
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
|
_LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
|
||||||
else
|
else
|
||||||
cat conftest.err 1>&5
|
cat conftest.err 1>&5
|
||||||
fi
|
fi
|
||||||
$RM conftest*
|
$RM conftest*
|
||||||
AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
|
])
|
||||||
|
_LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue