> If that were only true. The problem is that some architectures can be
> built with either endian. Mips, for example, seems to take the endian
> stuff in as an environment variable. The linker seems to know this
> stuff, but does not provide the "built in" to allow it to be used.
Huh? You can use CONFIG_CPU_LITTLE_ENDIAN. Gcc and the linker for
MIPS/Linux typically support both endiannesses (with a default selected at
their build time) and it's the configuration variable that selects either
of them.
> The info is available from the header files at compile time, but I could
> not find a clean way to export it to the Makefile, where we might choose
> which linker script to use. I suppose we could run the linker script
> thru cpp if all else fails. Any ideas?
CONFIG_CPU_LITTLE_ENDIAN is available to Makefiles. There used to be
separate linker scripts for different endiannesses for MIPS once.
-- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/