[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: host endianness
> > In the native build of pcc(1), we use a pre-generated config.h which
> > contains HOST_(BIG|LITTLE)_ENDIAN and TARGET_(BIG|LITTLE)_ENDIAN
> > definitions which should really be provided at build time. I found
> > <bsd.endian.mk> which supplies TARGET_ENDIANNESS but nothing about the
> > host.
> > Is it ok to add the test below so I can supply the HOST_*_ENDIAN symbol to
> > the pcc build as appropriate? Its basically a copy of the
> > MACHINE_ARCH/TARGET_ENDIANNESS test already there..
> Hm, except that test doesn't actually work.. seems that HOST_ARCH is
> actually _HOST_ARCH and it's not always set.
> any other suggestions to get the host endianness at build time?
With nbtool_config.h like src/sbin/disklabel/bswap.h?
#define BYTE_ORDER BIG_ENDIAN
#define BYTE_ORDER LITTLE_ENDIAN
#define HOST_BYTE_ORDER BYTE_ORDER
Main Index |
Thread Index |