Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfy9-00088o-Vh for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Aug 2022 13:53:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oOfy7-0008Ov-Nm for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Aug 2022 13:53:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfy7-0008OX-EH for pgsql-hackers@lists.postgresql.org; Thu, 18 Aug 2022 13:53:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOfy3-0001oF-BL for pgsql-hackers@postgresql.org; Thu, 18 Aug 2022 13:53:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27IDrmbM2369870; Thu, 18 Aug 2022 09:53:48 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: Strip -mmacosx-version-min options from plperl build In-reply-to: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Thu, 18 Aug 2022 08:57:51 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2369868.1660830828.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 18 Aug 2022 09:53:48 -0400 Message-ID: <2369869.1660830828@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > This is because the link command uses the option = > -mmacosx-version-min=3D11.3, which comes in from perl_embed_ldflags (per= l = > -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