From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25721 invoked by alias); 28 Dec 2002 17:56:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25708 invoked from network); 28 Dec 2002 17:56:50 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 28 Dec 2002 17:56:50 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva2.cipe.redhat.com [10.0.1.156]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id gBSHuZY27240; Sat, 28 Dec 2002 12:56:35 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id gBSHuYMK031911; Sat, 28 Dec 2002 15:56:34 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id gBSHuXZh031907; Sat, 28 Dec 2002 15:56:33 -0200 To: Doug Evans Cc: Nathanael Nerode , gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: (toplevel) Don't look for unprefixed tools unless they're appropriate References: <20021228072212.GA7409@doctormoo> <15885.51027.62243.955693@casey.transmeta.com> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Sat, 28 Dec 2002 09:58:00 -0000 In-Reply-To: <15885.51027.62243.955693@casey.transmeta.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-12/txt/msg00720.txt.bz2 --=-=-= Content-length: 1322 On Dec 28, 2002, Doug Evans wrote: > Alexandre Oliva writes: >> On Dec 28, 2002, Nathanael Nerode wrote: >> >> > Tested on i686-pc-linux-gnu with a Canadian cross. Now if the >> > prefixed tools can't be found (and the unprefixed tools are incorrect), >> > the tool values default to blank, which will cause entirely different >> > errors. (Heh.) >> >> Hmm... I don't quite like a blank default. I'd much rather default >> to -, since this at least gives the user the >> opportunity to adjust PATH after configure, and gives more of an idea >> of what's going on. > Agreed! Ok, this is what I'm checking in, after verifying that it does the right thing on native, cross, host-x-host and host-x-build set ups, namely, if host/target == build, default to the program name without prefix, otherwise prefix it with the host/target tool prefix. I predict we're going to have a *lot* of trouble when we switch to autoconf 2.5x in the top level. The way build/host/target_alias is defined has changed, and we're going to have to duplicate the logic autoconf uses for defaulting system names to pass the right arguments down. Eeek :-( I knew that right when the changes were introduced in autoconf, but I couldn't stop them, and then I had forgotten. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=toplev-conf.patch Content-length: 2827 Index: ChangeLog from Alexandre Oliva * configure.in (host_configargs): Replace reference to no-longer-defined buildopts with --build=${build_alias}. * configure: Rebuilt. Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.201 diff -u -p -r1.201 configure.in --- configure.in 28 Dec 2002 09:12:19 -0000 1.201 +++ configure.in 28 Dec 2002 17:28:42 -0000 @@ -1752,7 +1752,7 @@ case "${cache_file}" in cache_file_option="--cache-file=../${cache_file}" ;; esac -host_configargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" +host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" target_configargs=${baseargs} Index: config/ChangeLog from Alexandre Oliva * acx.m4: Name cache variables properly. (NCN_STRICT_CHECK_TOOL): If program is not found and value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2, depending on whether build != host or not. (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix. Index: config/acx.m4 =================================================================== RCS file: /cvs/gcc/gcc/config/acx.m4,v retrieving revision 1.1 diff -u -p -r1.1 acx.m4 --- config/acx.m4 28 Dec 2002 06:57:49 -0000 1.1 +++ config/acx.m4 28 Dec 2002 17:28:42 -0000 @@ -24,9 +24,9 @@ if test -n "$ncn_target_tool_prefix"; th [${ncn_target_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1" ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [$3], [$4]) + $1=$ncn_cv_$1 else $1="$ac_cv_prog_$1" fi @@ -45,11 +45,11 @@ if test -n "$ncn_tool_prefix"; then fi if test -z "$ac_cv_prog_$1" ; then if test $build = $host ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) + $1=$ncn_cv_$1 else - $1="$3" + $1="ifelse([$3],[],[${ncn_tool_prefix}$2],[$3])" fi else $1="$ac_cv_prog_$1" @@ -69,15 +69,13 @@ if test -n "$ncn_target_tool_prefix"; th fi if test -z "$ac_cv_prog_$1" ; then if test $build = $target ; then - ncn_ct_$1=$$1 - AC_CHECK_PROG([ncn_ct_$1], [$2], [$2], [$3], [$4]) - $1=$ncn_ct_$1 + ncn_cv_$1=$$1 + AC_CHECK_PROG([ncn_cv_$1], [$2], [$2], [ifelse([$3],[],[$2],[$3])], [$4]) + $1=$ncn_cv_$1 else - $1="$3" + $1="ifelse([$3],[],[${ncn_target_tool_prefix}$2],[$3])" fi else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL - - --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--