Re: Re: [PATCHES] patch for minor Win32 makefile bug - Mailing list pgsql-ports

From Fred Yankowski
Subject Re: Re: [PATCHES] patch for minor Win32 makefile bug
Date
Msg-id 20010403161804.A15564@enteract.com
Whole thread Raw
In response to Re: Re: [PATCHES] patch for minor Win32 makefile bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [PATCHES] patch for minor Win32 makefile bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Re: [PATCHES] patch for minor Win32 makefile bug  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-ports
I don't understand the several uses of DLLLIBS as well as I'd like,
but here's what I think is going on.

In makefiles/Makefile.win, DLLLIBS lists the libraries needed to build
the various DLLs associated with the interfaces/* and pl/plpgsql
directories.  As such it includes '-L$(top_builddir)/src/backend -lpostgres'
as well as several Cygwin utility libraries.

In backend/Makefile, DLLLIBS lists the libraries needed to build
postgres.exe.  This does not include '-lpostgres' since postgres.exe
is built by linking exactly the backend object files that also go into
libpostgres.a.  (I don't understand this organization.)

So, for example, in my work to add a wrapper layer to postgres.exe to
run as an NT service, I intend to use a function provided by libpopt,
referencing it from code in the backend/main/ directory.  It worked
(AFAICT) to add '-lpopt' to DLLLIBS in Makefile.win and remove the
DLLLIBS definition in backend/Makefile so that it picks up that value
from Makefile.win, because the appearance of '-lpostgres' is
extraneous but harmless when building postgres.exe.  Similarly,
'-lpopt' is not needed when building the DLLs in interfaces/* and
pl/plpgsql, but causes no problems.  It might make sense to use
'-lpopt' only when building postgres.exe.

I could live with the above scheme, but I admit that I don't
understand the postgres build structure well enough to be sure that
having these extra library names appearing in the final link steps
won't cause problems.


On Tue, Apr 03, 2001 at 04:04:54PM -0400, Tom Lane wrote:
> Fred Yankowski <fred@ontosys.com> writes:
> > I experimented with different ways to do this patch and discussed this
> > with Jason Tischler, and I now conclude that the meaning of DLLLIBS in
> > the two makefiles is different enough that it doesn't make sense to
> > try to factor-out common information to share between them.
>
> Well, in that case we DEFINITELY ought to replace them with two
> differently-named symbols.  However, I'm pretty confused about
> which is which and what gets used where.  Suggestions?

--
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

pgsql-ports by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [PATCHES] patch for minor Win32 makefile bug
Next
From: Tom Lane
Date:
Subject: Re: Re: [PATCHES] patch for minor Win32 makefile bug