Re: Strip -mmacosx-version-min options from plperl build
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-20T20:44:01Z
Lists: pgsql-hackers
Hi,
On 2022-08-19 10:00:35 -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> 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.
Looks like it'd also get rid of the bogus
-bE:/usr/opt/perl5/lib64/5.28.1/aix-thread-multi-64all/CORE/perl.exp we're
we're picking up on AIX (we had a thread about filtering that out, but I've only
done so inside the meson patch, round tuits).
So +1 from that front.
Maybe a daft question: Why do want any of the -l flags other than -lperl? With
the patch configure spits out the following on my debian system:
checking for CFLAGS to compile embedded Perl... -DDEBIAN
checking for flags to link embedded Perl... -L/usr/lib/x86_64-linux-gnu/perl/5.34/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
those libraries were likely relevant to build libperl, but don't look relevant
for linking to it dynamically. Statically would be a different story, but we
already insist on a shared build.
Greetings,
Andres Freund
Commits
-
mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc
- 0e497eadb1f4 16.0 landed
-
Fix PL/Perl build on Cygwin
- 1c3aa54502dd 16.0 landed
-
Remove further unwanted linker flags from perl_embed_ldflags
- b4e936859dc4 16.0 landed