Assar Westerlund wrote:
> 
> Mo DeJong <[EMAIL PROTECTED]> writes:
> > It seems clear that the AC_TRY_RUN does not have an argument for
> > the cross compile case.
> 
> You mean to do something else in that case?
> 
> > Can we at least get agreement that this AC_C_BIGENDIAN macro is in
> > fact broken?
> 
> I think so. 

Agreed.

> But it's really hard to figure out the endianess of
> another machine.  The only ways of doing that that I can think of is
> to add a table, have explicit options, or if we can find out from the
> include files (typically sys/endian.h).

Examining sys/endian.h like the current implementation on CVS does is
not sufficient, because endianness also can depend on CFLAGS (or
multilib) flags.

Therefore a configure.in which contains
AC_PROG_CC
AC_C_BIGENDIAN
will return bogus results for targets changing endianness depending on
CFLAGS.

As users are allowed to override CFLAGS etc. from the shell, I don't see
how this can ever work.

Eg.: 
./configure --host=sh-unknown-coff
-> bigendian
make CFLAGS=-ml
-> host in reality is little endian. 

Ralf.


-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED]           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de

Reply via email to