https://github.com/Perl/perl5/pull/17946 https://bugs.gentoo.org/757249 --- From b382aafc793fe1007f9058a5145a1d39d56cef70 Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Mon, 6 Jul 2020 22:59:42 +0100 Subject: [PATCH 1/7] Add 11.x support for darwin.sh --- hints/darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 0a91bc083c0..c0f06de1cab 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by # capturing its value and adding it to the flags. case "$MACOSX_DEPLOYMENT_TARGET" in - 10.*) + 10.* | 11.*) add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET ;; @@ -327,7 +327,7 @@ EOM # "ProductVersion: 10.11" "10.11" prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` case "$prodvers" in - 10.*) + 10.* | 11.*) add_macosx_version_min ccflags $prodvers add_macosx_version_min ldflags $prodvers ;; From 960d1a5c4225d1dd12636a469e10a568464e4e7c Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Wed, 8 Jul 2020 19:10:33 +0100 Subject: [PATCH 3/7] Update error message --- hints/darwin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index c0f06de1cab..988b766c4f4 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET *** -*** Please either set it to 10.something, or to empty. +*** Please either set it to 10.something, 11.something or to empty. EOM exit 1 From d633cced1d5174e19c5f2234a9fb4c7603cfb9db Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Sat, 11 Jul 2020 11:41:27 +0100 Subject: [PATCH 4/7] Update deprecated syscall check for 11.x and greater --- hints/darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 988b766c4f4..4f73a9995e7 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -342,11 +342,11 @@ EOM exit 1 esac - # The X in 10.X + prodvers_major=$(echo $prodvers|awk -F. '{print $1}') prodvers_minor=$(echo $prodvers|awk -F. '{print $2}') # macOS (10.12) deprecated syscall(). - if [ "$prodvers_minor" -ge 12 ]; then + if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then d_syscall='undef' # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime() case "$MACOSX_DEPLOYMENT_TARGET" in From 9c3890f8521a7db6d9b2aa21561c7d0dae9fb91d Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Wed, 22 Jul 2020 13:15:30 +0100 Subject: [PATCH 5/7] Simplify syscall check --- hints/darwin.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 4f73a9995e7..40c84cf267a 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -342,11 +342,10 @@ EOM exit 1 esac - prodvers_major=$(echo $prodvers|awk -F. '{print $1}') - prodvers_minor=$(echo $prodvers|awk -F. '{print $2}') + darwin_major=$(echo $osvers|awk -F. '{print $1}') - # macOS (10.12) deprecated syscall(). - if [[ ( "$prodvers_minor" -ge 12 && "$prodvers_major" -eq 10 ) || "$prodvers_major" -ge 11 ]]; then + # macOS 10.12 (darwin 6.0.0) deprecated syscall(). + if [ "$darwin_major" -ge 6 ]; then d_syscall='undef' # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime() case "$MACOSX_DEPLOYMENT_TARGET" in From 99ff8934992102a3db63805e8ba9710577de164e Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Wed, 22 Jul 2020 13:15:53 +0100 Subject: [PATCH 6/7] Update darwin.sh --- hints/darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 40c84cf267a..1709d224f7c 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -344,8 +344,8 @@ EOM darwin_major=$(echo $osvers|awk -F. '{print $1}') - # macOS 10.12 (darwin 6.0.0) deprecated syscall(). - if [ "$darwin_major" -ge 6 ]; then + # macOS 10.12 (darwin 16.0.0) deprecated syscall(). + if [ "$darwin_major" -ge 16 ]; then d_syscall='undef' # If deploying to pre-10.12, suppress Time::HiRes's detection of the system clock_gettime() case "$MACOSX_DEPLOYMENT_TARGET" in From 1b712e4b359d9508461a0a832d06baa6e589b955 Mon Sep 17 00:00:00 2001 From: Adam Hartley Date: Thu, 23 Jul 2020 19:53:07 +0100 Subject: [PATCH 7/7] Future proof version check --- hints/darwin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hints/darwin.sh b/hints/darwin.sh index 1709d224f7c..fdfbdd4a3b9 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -301,7 +301,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x # We now use MACOSX_DEPLOYMENT_TARGET, if set, as an override by # capturing its value and adding it to the flags. case "$MACOSX_DEPLOYMENT_TARGET" in - 10.* | 11.*) + [1-9][0-9].*) add_macosx_version_min ccflags $MACOSX_DEPLOYMENT_TARGET add_macosx_version_min ldflags $MACOSX_DEPLOYMENT_TARGET ;; @@ -313,7 +313,7 @@ case "$osvers" in # Note: osvers is the kernel version, not the 10.x *** Unexpected MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET *** -*** Please either set it to 10.something, 11.something or to empty. +*** Please either set it to a valid macOS version number (e.g., 10.15) or to empty. EOM exit 1 @@ -327,7 +327,7 @@ EOM # "ProductVersion: 10.11" "10.11" prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'` case "$prodvers" in - 10.* | 11.*) + [1-9][0-9].*) add_macosx_version_min ccflags $prodvers add_macosx_version_min ldflags $prodvers ;;