public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gcc@gcc.gnu.org
Cc: gdb@sources.redhat.com, binutils@sources.redhat.com, aoliva@redhat.com
Subject: Partial autoconf transition thoughts
Date: Mon, 09 Jun 2003 22:02:00 -0000	[thread overview]
Message-ID: <20030609220248.GA21303@nevyn.them.org> (raw)

[Sorry for the cross posting; I'm waiting for Zack et al. to figure out
where the new list should be.]

I spent some time today reviewing the --host/--build issues.  Fortunately,
target isn't relevant to autoconf's choices at this stage.

Consider the options:

	Build	Host
1	-	-
2	-	A
3	A	-
4	A	A
5	A	B

With plain target ("nonopt"), configure will act as if any unspecified
options had been given on the command line with the plain target as a value.

1.  Native build
	2.13: Native-build a compiler to run on the local system; test 
	      $CC for cross mode.
	2.57: Native-build a compiler to run on the local system
2.  Specify only host
	2.13: Assume that $build is $host; test $CC for cross mode.
	2.57: Same, but considered "deprecated", according to the manual.
	      However, based on generated configure, build will be guessed,
	      and cross compilation will be tested by running a program.
3.  Specify only build
	2.13: Host will be guessed; test $CC for cross mode.
	2.57: Host will default to $build, will build natively.
4.  Specify the same thing for both
	2.13: Both will be overridden; test $CC for cross mode.
	2.57: Both will be overridden, will build natively.
5.  Specify both different.
	2.13: Both will be overridden, test $CC for cross mode.
	2.57: Both will be overridden, will enter cross mode.


So I guess I don't see what the problem is with doing one directory at a
time.  If you want to build a compiler that runs on the build machine, then
we can always pass $build and $host to subdirectories with the same value;
if you want to build a compiler that runs on another machine, require the
user to specify --build and --host differently and always pass those to
subdirectories, and as long as $CC is a cross compiler both autoconfs will
do the right thing.  There are existence proofs that this (mostly!) works -
readline has been using autoconf 2.57 since its last import.  The readline
configure has issues cross compiling though, so don't treat it as an
example.

Could someone who thinks this won't work please speak up, before I waste a
lot of time?


As a proof of concept, I took gas/, and did a trivial convertion (with a
little help from Klee's patches:
  http://sources.redhat.com/ml/sid/2003-q1/msg00003.html
but not using some of the tricky bits).  The results were fine.  I tested a
native build on i386-linux and a --build=i686-pc-linux-gnu
--host=mipsel-hardhat-linux-gnu build, because that's what I had handy. 
What other cases are tricky and meaningful?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

             reply	other threads:[~2003-06-09 22:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-09 22:02 Daniel Jacobowitz [this message]
2003-06-09 22:17 ` Andrew Cagney
2003-06-09 22:34 ` Alexandre Oliva
2003-06-09 23:14   ` Daniel Jacobowitz
2003-06-10  0:44     ` Alexandre Oliva
2003-06-10  0:40 Nathanael Nerode
2003-06-10  0:59 ` Alexandre Oliva
2003-06-10 10:59   ` Maciej W. Rozycki
2003-06-10 11:38     ` Andreas Schwab
2003-06-10 12:45       ` Maciej W. Rozycki
2003-06-10 22:06     ` Alexandre Oliva
2003-06-11 11:32       ` Maciej W. Rozycki
2003-06-11 18:04         ` Alexandre Oliva
2003-06-11 19:39           ` Maciej W. Rozycki
2003-06-11 20:39             ` Alexandre Oliva
2003-06-12 11:21               ` Maciej W. Rozycki
2003-06-12 12:10                 ` Bernd Jendrissek
2003-06-12 12:26                   ` Maciej W. Rozycki
2003-06-12 21:42                     ` Alexandre Oliva
2003-06-13 10:35                       ` Maciej W. Rozycki
2003-06-13 14:02                         ` Alexandre Oliva
2003-06-13 18:32                           ` Maciej W. Rozycki
2003-06-13 19:25                             ` Alexandre Oliva
2003-06-13 20:15                               ` Maciej W. Rozycki
2003-06-13 20:54                                 ` Alexandre Oliva
2003-06-14 14:33                                   ` Maciej W. Rozycki
2003-06-14 15:43                                     ` Alexandre Oliva
2003-06-14 18:27                                       ` Maciej W. Rozycki
2003-06-26  7:24                                         ` Alexandre Oliva
2003-06-28  0:35                                           ` Maciej W. Rozycki
2003-06-10  1:40 Nathanael Nerode
2003-06-10  1:46 ` DJ Delorie

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=20030609220248.GA21303@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).