I have a minor problem. I'd like to use the Makefile.shlib that comes with
PostgreSQL when creating the pljava.dll. Due to the way native methods are
linked in Java, I need to use the dlltool option "--add-stdcall-alias" when
I create the dll definition file. In the Makefile.shlib, the dlltool for
cygwin and win32 is invoked as:
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)

in other words, there's no place to add extra options. I'd like it to be:

$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)

where DLLTOOL_DEFFLAGS is empty per default. The name DLLTOOL_DEFFLAGS is
chosen so that a DLLTOOL_LIBFLAGS could be added for the second dlltool
invokation that produces the lib. A DLLWRAP_FLAGS extending the dllwrap
invocation could be added as well (I don't need the latter two but I think
they should be added for consistency).

Is such a patch something that could be accepted?

regards,

Thomas Hallgren


Thu, 6 May 2004 23:11:29 +0200
"Thomas Hallgren" <thhal@mailblocks.com>
Makefile.shlib functionality on win32
Thomas Hallgren wrote:
> I have a minor problem. I'd like to use the Makefile.shlib that comes with
> PostgreSQL when creating the pljava.dll. Due to the way native methods are
> linked in Java, I need to use the dlltool option "--add-stdcall-alias" when
> I create the dll definition file. In the Makefile.shlib, the dlltool for
> cygwin and win32 is invoked as:
> $(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
> 
> in other words, there's no place to add extra options. I'd like it to be:
> 
> $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
> 
> where DLLTOOL_DEFFLAGS is empty per default. The name DLLTOOL_DEFFLAGS is
> chosen so that a DLLTOOL_LIBFLAGS could be added for the second dlltool
> invokation that produces the lib. A DLLWRAP_FLAGS extending the dllwrap
> invocation could be added as well (I don't need the latter two but I think
> they should be added for consistency).
> 
> Is such a patch something that could be accepted?

Sure.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Thu, 6 May 2004 18:11:02 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Makefile.shlib functionality on win32