From 55b5890c26936402c07d7ae9e41b2b9842e36842 Mon Sep 17 00:00:00 2001 From: Sevan Janiyan Date: Tue, 29 Apr 2025 15:53:10 +0100 Subject: [PATCH] hints/darwin.sh: drop $prodvers Unless MACOSX_DEPLOYMENT_TARGET is passed into the build, just ride the defaults of the OS' toolchain. This code assumes OS X versioning (10.15.x ) and tries to drop the patch version from the product version so that you're targetting macOS 10.15, rather than 10.15.1. Unfortunately with macOS 11 and up, it ends up targetting the patch version and since we're no longer appending $ld to $lddlflags we end up with the core targetting the major version and the modules targetting the patch version. Resulting in warnings ld: warning: object file (/Users/runner/work/perl5/perl5/cpan/Compress-Raw-Bzip2/Bzip2.o) was built for newer 'macOS' version (14.7) than being linked (14.0) --- hints/darwin.sh | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 127085c5a6..b9c8a88d9b 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -322,28 +322,6 @@ EOM ;; esac - # Keep the prodvers leading whitespace (Configure magic). - # Cannot use $osvers here since that is the kernel version. - # sw_vers output what we want - # "ProductVersion: 10.10.5" "10.10" - # "ProductVersion: 10.11" "10.11" - prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` - case "$prodvers" in - [1-9][0-9].*) - add_macosx_version_min ccflags $prodvers - add_macosx_version_min ldflags $prodvers - ;; - *) - cat <&4 - -*** Unexpected product version $prodvers. -*** -*** Try running sw_vers and see what its ProductVersion says. - -EOM - exit 1 - esac - darwin_major=$(echo $osvers|awk -F. '{print $1}') # macOS 10.12 (darwin 16.0.0) deprecated syscall().