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. > 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