When building on macOS against a Homebrew-provided Perl installation, I
get these warnings during the build:
ld: warning: object file (SPI.o) was built for newer macOS version
(12.4) than being linked (11.3)
ld: warning: object file (plperl.o) was built for newer macOS version
(12.4) than being linked (11.3)
...
This is because the link command uses the option
-mmacosx-version-min=11.3, which comes in from perl_embed_ldflags (perl
-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.