For one setting ld_ver in a conditional (no in-tree ld) when it's used, for x86 at least, in unconditional ways can't be quite right. And then prefixing relative paths to binaries with ${objdir}/, when ${objdir} nowadays resolves to just .libs, can at best be a leftover that wasn't properly cleaned up at some earlier point.
gcc/ * configure.ac: Drop ${objdir}/ from NM and AR. Move setting of ld_ver out of conditional. * configure: Re-generate. --- a/gcc/configure +++ b/gcc/configure @@ -9066,7 +9066,7 @@ fi # NM if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ && test -d ../binutils ; then - NM='${objdir}/../binutils/nm-new' + NM='../binutils/nm-new' else # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 @@ -9111,7 +9111,7 @@ fi # AR if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ && test -d ../binutils ; then - AR='${objdir}/../binutils/ar' + AR='../binutils/ar' else # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 @@ -25919,8 +25919,8 @@ _ACEOF +ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` if test $in_tree_ld != yes ; then - ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` if echo "$ld_ver" | grep GNU > /dev/null; then if test x"$ld_is_gold" = xyes; then # GNU gold --version looks like this: --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1320,7 +1320,7 @@ AC_SUBST(HAVE_PYTHON) # NM if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ && test -d ../binutils ; then - NM='${objdir}/../binutils/nm-new' + NM='../binutils/nm-new' else AC_CHECK_PROG(NM, nm, nm, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm) fi @@ -1328,7 +1328,7 @@ fi # AR if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ && test -d ../binutils ; then - AR='${objdir}/../binutils/ar' + AR='../binutils/ar' else AC_CHECK_PROG(AR, ar, ar, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar) fi @@ -3108,8 +3138,8 @@ AC_DEFINE_UNQUOTED(HAVE_GNU_INDIRECT_FUN changequote(,)dnl +ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` if test $in_tree_ld != yes ; then - ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` if echo "$ld_ver" | grep GNU > /dev/null; then if test x"$ld_is_gold" = xyes; then # GNU gold --version looks like this: