Libjava Changes for DG/ux
Tom Tromey
tromey@cygnus.com
Sun Sep 12 00:06:00 GMT 1999
>>>>> "Takis" == Takis Psarogiannakopoulos <takis@XFree86.org> writes:
Takis> I need some help from somebody from the developers that has
Takis> time free to finalize a port to DG/ux.
We will need paperwork before we can incorporate your port into the
libjava source tree. There is information on this on the web site.
Takis> 1) the configure in the main dir doesn't seem to take
Takis> in account the --with-threads or --with-threads=type,
Takis> (and pass it accordingly to configure of libjava).
The option is called --enable-threads, not --with-threads.
The top-level configure already passes down all --with-* and
--enable-* options -- presumably you were seeing a problem because
libjava doesn't actually recognize --with-threads.
Note that doing a full job of porting the threading layer requires you
to write thread support for gcc (to get thread-safe exception
handling). This support is not hard to write.
Does DG/ux really have its own thread system? It doesn't use POSIX
threads at all?
Takis> 2) the main configure doesn't pick up the flags from the
Takis> config/mh-os file (eg mh-dgux386).
Takis> In any case mh-dgux386 is wrong...
Takis> We could of course pass the CFLAGS, CXXFLAGS with the usual
Takis> way as
Takis> CFLAGS =" ..." CXXFLAGS="..." ... ./configure
Takis> but then the DG/ux user needs to read the docs and know
Takis> that he needs special flags.
What flags does a dgux user need?
Takis> 4) gethostbyname_r and gethostbyaddr_r are present in DG/ux
Takis> (I am including in this tgz attachement the header netdb.h).
Takis> The functions are actually in libnsl.so
Takis> libjava/configure.in (and configure) fails to see then!
Takis> I dont know how to fix this. Please advise.
We do look for the -lnsl library. However, we don't specifically
search for these functions there. Perhaps this library isn't being
chosen, or is being chosen after we decide that these functions don't
exist? (I think the latter is the case.)
Read config.log to see the actual output from the compile tests. That
will tell you exactly why these checks fail.
Takis> 6) DG/ux needs , when compiling the dgux-threads.cc to have
Takis> a -D_POSIX4A_DRAFT10_SOURCE that is why I am defining that
Takis> in libjava/configure.in However , as I said in the start I am
Takis> not so good with automake to create the Makefile.in again
Takis> Please advise.
Just define this at the very top of dgux-threads.cc, and include a
comment explaining why. If this needs to be defined for anything that
can use a thread function (I haven't looked at dgux-threads.h so I
don't know what you've inlined) then define it in dgux-threads.h
instead.
Takis> 7) Makefile.in needs the addition of dgux-threads.cc
Takis> There are actually two appearences of posix-threads.cc ...
Takis> In the first I add next to it dgux-threads.cc.
Takis> For the second I dont know what to do...
Takis> Ditto as 6), automake stuff, please advise.
In the current libgcj there is only one appearance of posix-threads.cc
-- in the EXTRA_libgcj_la_SOURCES macro.
Takis> 8) DG/ux has sched_priority in librte.a and not in libposix4.a
Takis> We need to add a section in libjava/configure.in to check
Takis> librte and add it to the libs.
This can be done. There is existing code (on the trunk; I haven't
looked at the branch) to check for -lposix4 and -lrt. Adding -lrte
here shouldn't be hard -- can you do it?
Takis> Paperwork: I really have no desire to get any credit for these,
Takis> my objective is just to see 2.95.2 libjava to has DG/ux stuff.
Takis> That for me would be enough.
The paperwork is a legal requirement on our end. Without it we can't
incorporate nontrivial changes into the tree.
Tom
More information about the Java
mailing list