Cross-compiling libjava

Momchil Velikov velco@fadata.bg
Sat Nov 2 05:11:00 GMT 2002


An excerpt from libjava/configure.in:
if test -n "${with_cross_host}"; then
 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
 # may not work correctly, because the compiler may not be able to
 # link executables.
 # We assume newlib. This lets us hard-code the functions we know
 # we'll have.
Well, this seems rather odd to me. Why wouldn't the compiler be able to
link executables ? It won't be able to *run* them, but to link ?!
And the assumption for newlib ? Why don't treat newlib just like any
other target ?
Besides certain functions appearing missing, which they are in fact
present, skipping prototype checks leads to compilation errors, e.g.:
/usr/velco/src/gcc-3.2/libjava/java/net/natInetAddress.cc:59:
declaration of C function `int gethostname(char*, int)' conflicts
with/usr/local/gcc/powerpc-netbsd/include/unistd.h:250: previous
declaration `int gethostname(char*, unsigned int)' here
gmake[4]: *** [java/net/natInetAddress.lo] Error 1
I'm building right now i386-netbsd -> powerpc-netbsd cross-compiler with
the attached patch and will sumbit it if all works well.
~velco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libjava.diff
Type: text/x-patch
Size: 18794 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20021102/1090307f/attachment.bin>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /