From: Jan Beulich Date: Fri, 14 Jun 2024 11:28:40 +0000 (+0200) Subject: configure: adjustments for building with in-tree binutils X-Git-Tag: basepoints/gcc-16~8222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b1f486fefb3969f35ff6d49f544eb0ac9f49f1f;p=thirdparty%2Fgcc.git configure: adjustments for building with in-tree binutils 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. --- diff --git a/gcc/configure b/gcc/configure index aaf5899cc03..94970e24051 100755 --- 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: diff --git a/gcc/configure.ac b/gcc/configure.ac index f8d67efeb98..35475cf5aae 100644 --- 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 +3108,8 @@ AC_DEFINE_UNQUOTED(HAVE_GNU_INDIRECT_FUNCTION, $gif, 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: