[Q] Endian-ness checks when cross-compiling

Kiyo Inaba inaba at src.ricoh.co.jp
Fri Jun 12 08:10:47 PDT 1998


Edwin Foo wrote,
>My PATH is set to see the cross-compiler in
>/usr/local/arm-unknown-linuxaout first, so the gcc found is detected as a
>cross compiler. The script gets far enough to check the endianness of the
>machine, but then stops and complains as follows:
>
>checking whether byte ordering is bigendian... configure: error: can not
>run test program while cross compiling

Uum, which version of kaffe are you talking? I'm also using cross
compiler with kaffe-0.10.0 but detecting endian has no problem.

My host is sparc-sunos4 and targets are mips-netbsd1 (same endian
with sparc) and m68k-sunos4. One possibility is different endian
between host and target, but I've never tested. Does someone try
to cross-compile x86 code on sparc or vice-versa?

Usually, I set AR, CC, CPP, RANLIB environment variables to
appropriate one, and once make configure to run, and modify
config.cache for
	ac_cv_alignmentof_voidp=${ac_cv_alignmentof_voidp='0'}
	ac_cv_sizeof___int64=${ac_cv_sizeof___int64='0'}
	ac_cv_sizeof_int=${ac_cv_sizeof_int='0'}
	ac_cv_sizeof_long=${ac_cv_sizeof_long='0'}
	ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='0'}
	ac_cv_sizeof_short=${ac_cv_sizeof_short='0'}
	ac_cv_sizeof_voidp=$${ac_cv_sizeof_voidp='0'}
, and rerun configure.

Then, the last thing done manually is to change symbolic links
for md.h and md.c. This can be solved in the future by someone
to include target machine handling in 'configure.in'. For the
time being target specified while configure does nothing.

Since I am working thread related issues for above systems, I
can not guarantee these are the only modification point or not.

Kiyo


More information about the kaffe mailing list