This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: JAXP suggestions
- From: Per Bothner <per at bothner dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 27 Nov 2002 13:37:54 -0800
- Subject: Re: JAXP suggestions
- References: <1038431095.4696.504.camel@escape>
Anthony Green wrote:
My suggestion
is to pull libgcj's org.xml and org.w3c out into lib-org-xml.so and
lib-org-w3c.so, and link these into every program _unless_ we use a new
compiler flags -fno-jaxp (or something like that). This would let
people link against newer implementations of these classes and retain
the nice feature of not having to worry about adding compiler/linker
flags in the default case.
That's a bit of a kludge, but ok for now. However, we *know* at
compile time which libraries need to be linked, so the system
should remember that. I'd like a mechanism such that if the compiler
generates a reference to a class in FOO.jar, then it should see if there
is a libFOO.so, and if so place in the .o file somethat that acts
like an implicit -lFOO.
I don't know how to do this, and it certainly isn't really
feasible with some .o formats, but I see no reason it can't
be done for (say) ELF. It is possible we might have to extend
the linker, but I wouldn't be surprised if it already supports this
- only doesn't get used.
Similar, if the compiler calls cos, it should associate an implied
-lmath in the generated .o file (if there is a separate libmath.so,
which I guess is rare these days).
Perhaps there are some ld/ELF experts at Red Hat you can ask about
the difficulty of this idea?
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/