Subject: Re: GNU config.guess and netbsd{aout,elf,}
To: Todd Vierling <>
From: Andrew Cagney <>
List: tech-toolchain
Date: 12/03/1999 20:42:26
Todd Vierling wrote:
> On Mon, 22 Nov 1999, Andrew Cagney wrote:
> : 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).
> This is used by my patches to libtool which have been integrated into the
> libtool source base:
>     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null
>         ...a.out (or other non-ELF format) system...
>     else
>         ...ELF system...
>     fi
> I suggest using the "if ..." statement above verbatim; there are issues
> about host portability (such as lack of "grep -q") which are already
> addressed by this precise syntax.

(Since when did grep have a -q flag? ;-)

So what ``a.out (or other non-EOF format) system''s were there?
I've seen a reference to COFF?  Is there a reliable way of identifying
any of these or is it easiest to just assume a given target had a given
format if not elf?