Ralf Corsepius <[EMAIL PROTECTED]> writes:
> 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. 

In my view, such a system should make sure that sys/endian.h returns
the correct value as a function of the CFLAGS.  I probably did not say
that, but obviously we should run cpp to get the value from
sys/endian.h and in that case `-ml' should be able to change the
value.  Of course, CPPFLAGS will be used instead of CFLAGS, but either
we just send CFLAGS to CPP in this case (ugly) or we define that
CPPFLAGS is the user-interface and that that's the environment
variable the user needs to set.

/assar

Reply via email to