pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Strip -mmacosx-version-min options from plperl build
Date: Thu, 18 Aug 2022 09:53:48 -0400
Message-ID: <2369869.1660830828@sss.pgh.pa.us> (raw)
In-Reply-To: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com>
References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com>

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> This is because the link command uses the option 
> -mmacosx-version-min=11.3, which comes in from perl_embed_ldflags (perl 
> -MExtUtils::Embed -e ldopts), but the compile commands don't use that 
> option, which creates a situation that ld considers inconsistent.

> I think an appropriate fix is to strip out the undesired option from 
> perl_embed_ldflags.  We already do that for other options.  Proposed 
> patch attached.

Agreed on rejecting -mmacosx-version-min, but I wonder if we should
think about adopting a whitelist-instead-of-blacklist approach to
adopting stuff from perl_embed_ldflags.  ISTR that in pltcl we already
use the approach of accepting only -L and -l, and perhaps similar
strictness would serve us well here.

As an example, on a not-too-new MacPorts install, I see

$ /opt/local/bin/perl -MExtUtils::Embed -e ldopts
    -L/opt/local/lib -Wl,-headerpad_max_install_names   -fstack-protector-strong  -L/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE -lperl

I can't see any really good reason why we should allow perl
to be injecting that sort of -f option into the plperl build,
and I'm pretty dubious about the -headerpad_max_install_names
bit too.

I think also that this would allow us to drop the weird dance of
trying to subtract ccdlflags.

			regards, tom lane





view thread (33+ messages)  latest in thread

Message-ID: <2369869.1660830828@sss.pgh.pa.us>
Permalink:  ../2369869.1660830828@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2369869.1660830828@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
  Subject: Re: Strip -mmacosx-version-min options from plperl build
  In-Reply-To: <2369869.1660830828@sss.pgh.pa.us>
  References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> <2369869.1660830828@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox