Re: [PORTS] Re: patch for minor Win32 makefile bug

From: Fred Yankowski <fred(at)ontosys(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jason(dot)Tishler(at)dothill(dot)com, pgsql-patches(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org
Subject: Re: [PORTS] Re: patch for minor Win32 makefile bug
Date: 2001-04-03 21:18:04
Message-ID: 20010403161804.A15564@enteract.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches 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(at)ontosys(dot)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(at)OntoSys(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-04-03 22:03:45 Re: [PORTS] Re: patch for minor Win32 makefile bug
Previous Message Kyle VanderBeek 2001-04-03 21:09:33 JDBC int8 hack

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2001-04-03 22:03:45 Re: [PORTS] Re: patch for minor Win32 makefile bug
Previous Message Tom Lane 2001-04-03 20:04:54 Re: [PORTS] Re: patch for minor Win32 makefile bug