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]

[PATCH] Fix ACX_CHECK_INSTALLED_TARGET_TOOL


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.

Tested on powerpc-linux with a native and a cross (re-)configuration.

Andreas.

2006-02-13  Andreas Schwab  <schwab@suse.de>

	* configure: Regenerate.

config/:
	* acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Always set VAR.  When
	using $with_build_time_tools append PROG, not VAR.

Index: config/acx.m4
===================================================================
--- config/acx.m4	(revision 110897)
+++ config/acx.m4	(working copy)
@@ -272,7 +272,7 @@ 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
+    $1=`cd $with_build_time_tools && pwd`/$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
 
 ###

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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