public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* libgcj, Win32 & dll's
@ 2000-04-01  0:00 Jeff Sturm
  2000-04-01  0:00 ` Bryce McKinlay
  2000-04-01  0:00 ` libgcj, Win32 & dll's Tom Tromey
  0 siblings, 2 replies; 94+ messages in thread
From: Jeff Sturm @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

Having reached a point where I can benefit from a native Win32 port of
libgcj, I scanned the archives to see what had been done... apparently
nothing that is complete, ready, tested.  There was/is a web site for
libgcj on Win32, though it appears to be unreachable.

So I built a native (i686-mingw32) Win32 GCC toolchain successfully,
with the Java frontend and Win32 thread support.  I proceeded to build
libgcj.  The java.lang and java.io stuff all built with minor changes
(benefitting from the fact that CRTDLL.DLL is somewhat POSIX-ish). 
Threads and java.net need more work, and I haven't yet tried boehm-gc
(which _should_ handle Win32 out-of-the-box).  Simple Java programs now
link & execute just fine.  Everything else can probably be done without
too much effort, thanks to great work done by the GCC and Mingw32
coders.

BUT... all of libgcj is static-linked so far.  Libtool has no idea how
to build a shared library on Win32, so I attempted to convert libgcj.a
into libgcj.dll somehow, knowing nothing about DLLs in the process. 
I've since learned that Win32 DLLs require a stub library, and they
export library functions as a jump table, and data symbols via
indirection (sort of like early COFF shared libraries back in SVR3
days).

The trouble is that gcj-compiled classes share various global data
symbols, such as the vtable and class objects.  There's no way that I
can see to link Java classes in a DLL, since these data symbols are
generated internally by gcj.  C/C++ programmers work around the problem
by using the __declspec(dllimport) and __declspec(dllexport) modifiers,
which instructs gcc to generate the extra indirection code.  But there
are no similar modifiers for Java (and I certainly don't advocate
extending the language).

I'm not really sure what to do next... gcj for Win32 won't be very
useful with static linkage only.  I suppose I could move just the C/C++
portion of the runtime into a DLL, but that wouldn't shrink the
executables much.  Any other ideas?  Did I miss something obvious??

-- 
Jeff Sturm
jsturm@sigma6.com

^ permalink raw reply	[flat|nested] 94+ messages in thread
[parent not found: <Pine.LNX.4.10.10001161252070.604-100000@cc42593-a.taylor1.mi.home.com>]

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 94+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01  0:00 libgcj, Win32 & dll's Jeff Sturm
2000-04-01  0:00 ` Bryce McKinlay
2000-04-01  0:00   ` Jeff Sturm
2000-04-01  0:00     ` libgcj for win32 Jon Beniston
2000-04-01  0:00       ` Jeff Sturm
2000-04-01  0:00         ` Jon Beniston
2000-04-01  0:00           ` Jeff Sturm
2000-03-20  6:19             ` Interrupted IO and AWT Jon Beniston
2000-03-20  7:07               ` Jeff Sturm
2000-03-20  8:21                 ` Tom Tromey
2000-03-20 10:30                   ` Per Bothner
2000-03-20 12:42                     ` Jeff Sturm
2000-03-20 12:51                       ` Tom Tromey
2000-04-01  0:00                         ` Tom Tromey
2000-03-20 13:09                       ` Paul Fisher
2000-03-20 13:25                         ` Per Bothner
2000-03-21 14:21                           ` Paul Fisher
2000-04-01  0:00                             ` Paul Fisher
2000-04-01  0:00                           ` Per Bothner
2000-04-01  0:00                         ` Paul Fisher
2000-03-20 13:17                       ` Per Bothner
2000-03-20 17:48                         ` Bryce McKinlay
2000-03-21  7:18                           ` Tom Tromey
2000-03-21  8:06                             ` Jeff Sturm
2000-04-01  0:00                               ` Jeff Sturm
2000-04-01  0:00                             ` Tom Tromey
2000-04-01  0:00                           ` Bryce McKinlay
2000-04-01  0:00                         ` Per Bothner
2000-04-01  0:00                       ` Jeff Sturm
2000-04-01  0:00                     ` Per Bothner
     [not found]                   ` <38D681A9.1ED6097A@berger.to>
2000-03-20 20:59                     ` AWT is dead now Cedric Berger
2000-03-20 21:30                       ` Per Bothner
2000-03-20 22:23                         ` Bryce McKinlay
2000-04-01  0:00                           ` Bryce McKinlay
2000-03-20 22:25                         ` Cedric Berger
2000-03-20 22:56                           ` Per Bothner
2000-03-21  9:26                             ` Cedric Berger
2000-03-21  9:38                               ` Denis Balazuc
2000-04-01  0:00                                 ` Denis Balazuc
2000-04-01  0:00                               ` Cedric Berger
2000-04-01  0:00                             ` Per Bothner
2000-04-01  0:00                           ` Cedric Berger
2000-03-21  1:01                         ` Joerg Brunsmann
2000-04-01  0:00                           ` Joerg Brunsmann
2000-03-21 14:33                         ` Paul Fisher
2000-04-01  0:00                           ` Paul Fisher
2000-04-01  0:00                         ` Per Bothner
2000-03-20 22:13                       ` Bryce McKinlay
2000-04-01  0:00                         ` Bryce McKinlay
2000-03-21  2:18                       ` David Pettersson
2000-04-01  0:00                         ` David Pettersson
2000-03-21  6:48                       ` Jeff Sturm
2000-03-21  9:00                         ` Cedric Berger
2000-03-21  9:47                           ` Jeff Sturm
2000-03-21 10:12                             ` Cedric Berger
2000-04-01  0:00                               ` Cedric Berger
2000-04-01  0:00                             ` Jeff Sturm
2000-04-01  0:00                           ` Cedric Berger
2000-03-21 14:05                         ` Paul Fisher
2000-04-01  0:00                           ` Paul Fisher
2000-04-01  0:00                         ` Jeff Sturm
2000-03-21  8:56                       ` ks
2000-03-21  9:17                         ` Cedric Berger
2000-03-21  9:57                           ` ks
2000-03-21 10:22                             ` Cedric Berger
2000-03-21 10:41                               ` jean-marie sulmont
2000-04-01  0:00                                 ` jean-marie sulmont
2000-04-01  0:00                               ` Cedric Berger
2000-04-01  0:00                             ` ks
2000-04-01  0:00                           ` Cedric Berger
2000-03-21  9:44                         ` Brian Sullivan
2000-03-21 11:38                           ` Jonathan P. Olson
2000-03-21 11:46                             ` Nathan Meyers
2000-04-01  0:00                               ` Nathan Meyers
2000-04-01  0:00                             ` Jonathan P. Olson
2000-04-01  0:00                           ` Brian Sullivan
2000-04-01  0:00                         ` ks
2000-04-01  0:00                       ` Cedric Berger
2000-04-01  0:00                   ` Interrupted IO and AWT Tom Tromey
2000-04-01  0:00                 ` Jeff Sturm
2000-03-20  8:22               ` Tom Tromey
2000-03-20 12:03                 ` Paul Fisher
2000-04-01  0:00                   ` Paul Fisher
2000-04-01  0:00                 ` Tom Tromey
2000-03-21  0:57               ` Interrupted IO and AWT -> Remote AWT Jens Wilke
2000-04-01  0:00                 ` Jens Wilke
2000-04-01  0:00               ` Interrupted IO and AWT Jon Beniston
2000-04-01  0:00             ` libgcj for win32 Tom Tromey
2000-04-01  0:00 ` libgcj, Win32 & dll's Tom Tromey
2000-04-01  0:00   ` Alexandre Oliva
2000-04-01  0:00     ` Tom Tromey
2000-04-01  0:00       ` Jeff Sturm
2000-04-01  0:00   ` Jeff Sturm
     [not found] <Pine.LNX.4.10.10001161252070.604-100000@cc42593-a.taylor1.mi.home.com>
2000-04-01  0:00 ` libgcj for win32 Jon Beniston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).