Cross-compiling libjava
Tom Tromey
tromey@redhat.com
Sat Nov 2 13:46:00 GMT 2002
>>>>> "Momchil" == Momchil Velikov <velco@fadata.bg> writes:
Momchil> Well, this seems rather odd to me. Why wouldn't the compiler
Momchil> be able to link executables ? It won't be able to *run* them,
Momchil> but to link ?!
Momchil> And the assumption for newlib ? Why don't treat newlib just
Momchil> like any other target ?
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.
I think when using newlib we must maintain the no-link rule. If
Anthony is reading, maybe he can speak more to this; I know he does a
newlib-based build from time to time.
The assumption that a cross build uses newlib is indeed bogus. It
dates from the very early days, when this was the only sort of cross
we cared about. Lifting this is definitely worthwhile. One idea
would be to look at the value of $with_cross_host and decide what to
do on that basis. Or, maybe there's some way to find out whether the
target's base libraries are being built in the same tree.
Tom
More information about the Java
mailing list