This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] [MinGW]: Don't add dll[im/ex]port attributes to libgcj, unless dll build
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: tromey at redhat dot com
- Cc: java-patches at gcc dot gnu dot org, Danny Smith <dannysmith at users dot sourceforge dot net>, aph at redhat dot com
- Date: Wed, 12 Nov 2003 01:27:03 -0600
- Subject: Re: [PATCH] [MinGW]: Don't add dll[im/ex]port attributes to libgcj, unless dll build
- Reply-to: gnustuff at thisiscool dot com
Hi Tom,
>Mohan> Conceivably, this could be done now by checking for
>Mohan> --enable-shared at configure time, but this seems like more
>Mohan> trouble than it's worth at this stage of the game, since I
>Mohan> don't see a DLL build under Windows for a long time to come. I
>Mohan> don't know what your take on this is.
>
>Eventually someone will resurrect AG's instructions on how to do this,
>and implement them in libgcj. Isn't that the only barrier?
I don't think this is the only barrier.
I'm not an expert in this matter, but I'll type on anyway. If any of
my statements are incorrect, someone please correct me.
The approach that Anthony documented is a magical, yet brute-force
approach whereby all symbols in a static library are exported for the DLL.
This works, but there are some drawbacks in my mind:
- This is an expensive process in terms of memory and computation.
If people thought my build-all-classfiles-at-once patch was bad
(which ran happily on my P450/256M box), wait'll they see what
happens when they follow AG's instructions. It blew my build box
out of the water and I was only able to follow through on this by
booting my P733/1024M box into Linux.
- http://gcc.gnu.org/ml/java/2003-04/msg00188.html
- http://gcc.gnu.org/ml/java/2003-04/msg00172.html
- To my knowledge, there are still unresolved issues with exceptions
being thrown across DLL boundaries. This is probably a show-stopper
for anything but toy apps. I'm not sure whether the MinGW-local
patches resolve this.
- http://gcc.gnu.org/ml/java/2003-09/msg00211.html
- The correct (but not necessarily most expedient) approach would be
to build the intelligence of which symbols to export into the compiler,
which would presumably be more parsimonious about this than with
the brute-force approach. There was some discussion between Andrew
and Ranjit about this, but I've only skimmed it because most of it goes
over my head:
- http://gcc.gnu.org/ml/java/2003-04/threads.html#00002
Here is one of the key posts in that thread:
- http://gcc.gnu.org/ml/java/2003-04/msg00012.html
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/