Hi,

On 2022-08-19 10:00:35 -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentr...@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


Reply via email to