This is the mail archive of the 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]

Re: [PATCH] [MinGW]: Don't add dll[im/ex]port attributes to libgcj, unless dll build

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.


- 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.


- 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:

   Here is one of the key posts in that thread:


-- Mohan

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