tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: host endianness

> > #define HOST_BYTE_ORDER               BYTE_ORDER
> This however, requires modifying the pcc dist for a NetBSD-ism, which I'm
> reluctant to do (the native pcc build just uses GNU configure to provide
> this definition for each use case)

What do you actually want to do?

You wrote in the original post:
>> In the native build of pcc(1), we use a pre-generated config.h which
>> definitions which should really be provided at build time.

What is the "native build"?
Should it assume cross build or not?

If you can assume target == host,
(building src/usr.bin/pcc using /usr/bin/pcc)
you can simply use TARGET_ENDIANNESS for the host,
or hardcode it in target config files like

If you need generic cross-build structures,
you can't assume the host is NetBSD
(i.e. we can't predict what uname(1) returns),
and you might need a generic run-time test as
configure does.
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index