Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Doug Evans <dje@transmeta.com>
Cc: Nathanael Nerode <neroden@twcny.rr.com>,
	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
Date: Sat, 28 Dec 2002 09:58:00 -0000	[thread overview]
Message-ID: <or4r8y58oe.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <15885.51027.62243.955693@casey.transmeta.com>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On Dec 28, 2002, Doug Evans <dje@transmeta.com> wrote:

> Alexandre Oliva writes:
>> On Dec 28, 2002, Nathanael Nerode <neroden@twcny.rr.com> 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 <host/target>-<tool>, 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: toplev-conf.patch --]
[-- Type: text/x-patch, Size: 2827 bytes --]

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* 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  <aoliva@redhat.com>

	* 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
-
-

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


-- 
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

  reply	other threads:[~2002-12-28 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-27 23:29 Nathanael Nerode
2002-12-28  1:01 ` Alexandre Oliva
2002-12-28  7:48   ` Doug Evans
2002-12-28  9:58     ` Alexandre Oliva [this message]
2002-12-28  8:17 ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=or4r8y58oe.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=dje@transmeta.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=neroden@twcny.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox