Cross-compiling libjava

Tom Tromey
Wed Nov 6 08:27:00 GMT 2002

>>>>> "Ranjit" == Ranjit Mathew <> writes:

>> Suppose you have a unified build tree where newlib is built as part of
>> the tree.  In this situation, newlib is a target library, a sibling of
>> libgcj.  In this case, at the time that the libgcj configure script
>> runs, newlib hasn't yet been built, and so link tests will fail.

Ranjit>  From looking at the top-level GCC Makefile, it seems that
Ranjit> newlib will be built before libjava - though it's not a direct
Ranjit> dependency, isn't it assured that newlib would be built before
Ranjit> libjava?

The problem is that all the target configure scripts are run before
any target libraries are built.  So when libjava is configured, newlib
has been configured but not built.

Ranjit> Post GCC 3.2, this conditional now reads "with_newlib" instead
Ranjit> of "with_cross_host" - this even more incorrect. IMHO, we should
Ranjit> stick with the conditional for "with_cross_host".

Great!  Write up a clean patch to use this variable instead, and I'll
put it in.

Ranjit> 1. The GCC toplevel configure says --with-cross-host is deprecated
Ranjit>     and target libraries should use some other mechanism, but doesn't
Ranjit>     suggest any alternative. What's wrong with using this flag?

No clue.

Ranjit> Does this sound OK? Did I miss out anything? (apart from
Ranjit> the details that is)

I think this summary is ok.  It seems like the only real change we
need is to special-case newlib, and have other crosses ("host-x-host"
crosses) do compile- and link- tests.


More information about the Java mailing list