Re: Removing link-time cross-module refs in contrib

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Removing link-time cross-module refs in contrib
Date: 2017-01-28 02:59:17
Message-ID: 20170128025917.GA714552@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 03, 2016 at 12:29:18PM -0400, Tom Lane wrote:
> Pursuant to Andres' suggestion in
> https://www.postgresql.org/message-id/20161002223927.57xns3arkdg4hu6x@alap3.anarazel.de
> attached is a draft patch that gets rid of link-time references
> from hstore_plpython to both hstore and plpython. I've verified
> that this allows "LOAD 'hstore_plpython'" to succeed in a fresh
> session without having loaded the prerequisite modules first.

I like how that turned out. However, ...

> *** a/contrib/hstore_plpython/Makefile
> --- b/contrib/hstore_plpython/Makefile

> --- 23,40 ----
> include $(top_srcdir)/contrib/contrib-global.mk
> endif
>
> ! # We must link libpython explicitly
> ifeq ($(PORTNAME), aix)
> rpathdir = $(pkglibdir):$(python_libdir)

... adding $(pkglibdir) to rpath is obsolete, now that this ceased to link to
hstore explicitly.

> ! SHLIB_LINK += $(python_libspec) $(python_additional_libs)
> ! else
> ifeq ($(PORTNAME), win32)
> ! # ... see silliness in plpython Makefile ...
> ! SHLIB_LINK += $(sort $(wildcard ../../src/pl/plpython/libpython*.a))
> ! else
> ! rpathdir = $(python_libdir)
> ! SHLIB_LINK += $(python_libspec)

For consistency with longstanding src/pl/plpython practice, $(python_libspec)
should always have an accompanying $(python_additional_libs). This matters on
few configurations.

I propose to clean up both points as attached. Tested on AIX, which ceases to
be a special case.

Attachment Content-Type Size
no-link-xmodule-code-review-v1.patch text/plain 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-01-28 03:20:41 Re: WIP: About CMake v2
Previous Message Peter Eisentraut 2017-01-28 02:43:10 Re: COPY as a set returning function