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 1oP2YD-00072X-36 for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Aug 2022 14:00:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oP2YB-0004R6-Uc for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Aug 2022 14:00:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP2YB-0004Qx-LP for pgsql-hackers@lists.postgresql.org; Fri, 19 Aug 2022 14:00:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oP2Y9-0003RJ-DA for pgsql-hackers@postgresql.org; Fri, 19 Aug 2022 14:00:38 +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 27JE0ZNl3050654; Fri, 19 Aug 2022 10:00:35 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: Strip -mmacosx-version-min options from plperl build In-reply-to: <9518842c-6844-0c99-85ec-ec43fba3115f@enterprisedb.com> References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> <2369869.1660830828@sss.pgh.pa.us> <9518842c-6844-0c99-85ec-ec43fba3115f@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Fri, 19 Aug 2022 09:12:06 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3050652.1660917635.1@sss.pgh.pa.us> Date: Fri, 19 Aug 2022 10:00:35 -0400 Message-ID: <3050653.1660917635@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > After analyzing the source code of ExtUtils::Embed's ldopts, I think we > can also do this by subtracting $Config{ldflags}, since > my $linkage = "$ccdlflags $ldflags @archives $ld_or_bs"; > and we really just want the $ld_or_bs part. (@archives should be empty > for our uses.) +1, this looks like a nice clean solution. I see that it gets rid of stuff we don't really want on RHEL8 as well as various generations of macOS. > This would get rid of -mmacosx-version-min and -arch and all the things > you showed, including -L/opt/local/lib, which is probably there so that > the build of Perl itself could look there for things, but we don't need it. It is a little weird that they are inserting -L/opt/local/lib or -L/usr/local/lib on so many different platforms. But I concur that if we need that, we likely should be inserting it ourselves rather than absorbing it from their $ldflags. BTW, I think the -arch business is dead code anyway now that we desupported PPC-era macOS; I do not see any such switches from modern macOS' perl. So not having a special case for that is an additional win. Patch LGTM; I noted only a trivial typo in the commit message: -like we already do with $Config{ccdlflags}. Those flags the choices +like we already do with $Config{ccdlflags}. Those flags are the choices regards, tom lane