This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Canadian Cross Compiling Issues


Hi,

    IMHO, the libgcj tests for Native/Cross/Canadian-Cross
are a little broken - I was bitten by these while trying
to build Windows native GCJ from GCC 3.2 sources on a Linux
box and I still see them in the current CVS. (Even libstdc++
has the same issues, but they didn't bite me at all compared to
those in libgcj.)

For example, the GCC 3.2 libjava/configure script needs
an explicit --with-cross-host flag (so does the current
script) and still the check for canadian cross is broken ("&&"
instead of "-a" - fixed in the current tree though):

if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"

And even then it only defines GCJ to "{target_alias}-gcj" - GCJH
also needs to be defined likewise (and changes made to configure
and Makefile.in to take this into account). It also resets
GCJ_UNWIND_INCLUDE for some reason which breaks the build
later.

I will post my diffs to the GCC 3.2 libjava configure and
Makefile.in that finally allowed me to build libgcj and
related tools properly.

And in the current CVS, we bother checking for a Canadian Cross
only if --with-newlib has been specified and then again, only
if --with-cross-host has been specified.

As yet another example, the fastjar configure script in GCC 3.2
dies out if I am building a Canadian Cross with a message like
"can not run test when cross compiling" (for testing sizeof char).

I feel that we are unnecesarily combining the issues related
to cross compiling (and canadian cross compiling) per se and
compiling to embedded targets which might not have a C library
(or only a minimal one like newlib).

I will try to collect my thoughts on this and present it in
a more coherent and hopefully clearer manner than this rant
but in the meantime I would like to appeal to those with
more experience and wisdom to give these issues more serious
thought.

Please note that I do understand that this is quite a difficult
thing to do and that it already is quite amazing that these
things are possible at all, but I would still like it to be
a bit cleaner - and simpler.

Thanks for your patience and support.

Sincerely Yours,
Ranjit Mathew.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]