This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ACX_CHECK_INSTALLED_TARGET_TOOL


Andreas Schwab wrote:
This patch fixes two bugs in ACX_CHECK_INSTALLED_TARGET_TOOL:

- the macro leaves VAR empty when ac_cv_path_VAR is already set.  That
causes the variable like AR_FOR_TARGET to be left empty in the makefile
when reconfiguring a cross compiler.

- when ac_cv_path_VAR is empty and --with-build-time-tools is used then
VAR is set to $with_build_time_tools/VAR instead of
$with_build_time_tools/PROG.

Was this committed? If not, I will remind you know that it was preapproved. Also, it is lacking a hunk (try grepping the configure script for /AR_FOR_TARGET).


I attach the patch that I was testing, plus your fix for the first bullet above (which I had missed).

Paolo
Index: ../config/acx.m4
===================================================================
--- ../config/acx.m4	(revision 110908)
+++ ../config/acx.m4	(working copy)
@@ -138,8 +138,8 @@ AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOLS]
 if test -n "$with_build_time_tools"; then
   for ncn_progname in $2; do
     AC_MSG_CHECKING([for ${ncn_progname} in $with_build_time_tools])
-    if test -x $with_build_time_tools/$1; then
-      ac_cv_prog_$1=$with_build_time_tools/$1
+    if test -x $with_build_time_tools/${ncn_progname}; then
+      ac_cv_prog_$1=$with_build_time_tools/${ncn_progname}
       AC_MSG_RESULT(yes)
       break
     else
@@ -271,8 +271,8 @@ AC_REQUIRE([ACX_TOOL_DIRS])
 AC_REQUIRE([ACX_HAVE_GCC_FOR_TARGET])
 if test -z "$ac_cv_path_$1" ; then
   if test -n "$with_build_time_tools"; then
-    AC_MSG_CHECKING([for ${ncn_target_tool_prefix}${ncn_progname} in $with_build_time_tools])
-    $1=`cd $with_build_time_tools && pwd`/$1
+    AC_MSG_CHECKING([for ${ncn_target_tool_prefix}$2 in $with_build_time_tools])
+    $1=`cd $with_build_time_tools && pwd`/${ncn_target_tool_prefix}$2
     ac_cv_path_$1=[$]$1
     AC_MSG_RESULT([$ac_cv_path_$1])
   elif test $build != $host && test $have_gcc_for_target = yes; then
@@ -287,6 +287,7 @@ fi
 if test -z "$ac_cv_path_$1" ; then
   NCN_STRICT_CHECK_TARGET_TOOLS([$1], [$2])
 fi
+$1=$ac_cv_path_$1
 ]) []dnl # ACX_CHECK_INSTALLED_TARGET_TOOL
 
 ###

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]