Subject: GNU config.guess and netbsd{aout,elf,}
To: None <tech-toolchain@netbsd.org>
From: Andrew Cagney <ac131313@cygnus.com>
List: tech-toolchain
Date: 11/22/1999 16:18:59
Hello,

Since NetBSD is migrating to ELF, what if anything is going to be done
to config.guess so that the GNU tool chains (gcc+binutils+gdb) can
automatically be configured for either the old (a.out) or new (ELF)
platforms?

FreeBSD tweaked config.guess so that it returned:

	freebsdNNNN
		for a.out build environment.
and
	freebsdelfNNNN
		for newer ELF based build environment

I'd first like to recommend that within each tool directory the
configury code be updated so that:

	netbsdelf
and	netbsdaout

be recognized as part of a target tupple so that the user can explicitly
specify --target=...-netbsd{elf,aout} to build the applicable target
tools.  As for which of these an abbreviated ...-netbsd should select,
well, ... see below.

I'd then like to open up discussion on what to do with config.guess.
config.guess returns a tupple indicating the build system's
architecture, OS and other features.  The following alternatives come to
mind:

	  a.out        ELF
	netbsd       netbsdelf (a)
	netbsdaout   netbsd (b)
	netbsdaout   netbsdelf (c)

(a) FreeBSD behavior
(b) Fairly aggressive as it would involve going through the gnu tools
and ensuring that they all compiled to this schema for all NetBSD
platforms those tools currently support (less than you might expect). 
It would also mean that old a.out tools would install onto the top of
new ELF tools and vice versa.
(c) More aggressive than (b) but at least it is clear what is going on
:-)

Opinion?

	Andrew

PS: Can someone suggest a reliable a.out vs ELF test that config.guess
can use to differentiate between an ELF and a.out build environment? 
(FreeBSD tested for /usr/bin/objformat).

(1) By ``build environment'' I am referring to the system that the tools
are to be built on. If you don't specify --target= or --host= then the
GNU configury assumes the target is the same as the build environment as
identified by config.guess.