Skip to content

Commit 9d7c797

Browse files
committed
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)
1 parent 423d795 commit 9d7c797

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

hints/darwin.sh

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -322,28 +322,6 @@ EOM
322322
;;
323323
esac
324324

325-
# Keep the prodvers leading whitespace (Configure magic).
326-
# Cannot use $osvers here since that is the kernel version.
327-
# sw_vers output what we want
328-
# "ProductVersion: 10.10.5" "10.10"
329-
# "ProductVersion: 10.11" "10.11"
330-
prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
331-
case "$prodvers" in
332-
[1-9][0-9].*)
333-
add_macosx_version_min ccflags $prodvers
334-
add_macosx_version_min ldflags $prodvers
335-
;;
336-
*)
337-
cat <<EOM >&4
338-
339-
*** Unexpected product version $prodvers.
340-
***
341-
*** Try running sw_vers and see what its ProductVersion says.
342-
343-
EOM
344-
exit 1
345-
esac
346-
347325
darwin_major=$(echo $osvers|awk -F. '{print $1}')
348326

349327
# macOS 10.12 (darwin 16.0.0) deprecated syscall().

0 commit comments

Comments
 (0)