Subject: Re: GNU config.guess and netbsd{aout,elf,}
To: Simon Burge <simonb@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 11/22/1999 01:31:50
In message <199911220824.TAA02952@balrog.supp.cpr.itg.telecom.com.au>Simon Burg
e writes
>Jonathan Stone wrote:
>
>> For dynanic tests -- what does libtool do?  Safest is to link a
>> hello-world program and use file to test if it's ELF.
>> (ELF programs  will include "ELF" in file(1) output
>
>Or check for the __ELF__ define in the C preprocessor...

I meant it when I said "sicko". 

yes, Virginia, I *have* built egcs from -current, in a.out format,
and installed it on a 1.4.1 userland, with a.out gas/ld.

I thought I had an EGCS 1.1.1 bug in my PhD thesis code.  Turns out,
the aggressive ANSI optimizations i n egcs break a well-recognised,
~20-year-old C cliche used by folks in the networking community.  
At whicih point I put on my 6th. Ed.-compiler user's hat and say that
this is a but knit he ANSI C standard, dammit.

Maringally on-topic. C The code fragment 

	u_short VOLATILE rem;
	rem = 0;
	*(VOLATILE char *)&rem = buf[len-1];
	sum += rem;

(where buf is a _char *) is intended to add in the last byye of an
odd-byte packet, during Internet checkum computation.

It gives the intended result with gcc 2.x if VOLATILE is #define'd to
the empty ring, but gives unintended results when ts with egcs unless
VOLATILE is #defined' to volatile.  Is that a user bug, or a compiler bug?

The IRTF needs to know :->