]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Force macOS 10.15 or later to be 64-bit
authorTodd Short <tshort@akamai.com>
Wed, 9 Feb 2022 20:59:37 +0000 (15:59 -0500)
committerPauli <pauli@openssl.org>
Tue, 15 Feb 2022 23:09:42 +0000 (10:09 +1100)
macOS Catalina (10.15) no longer supports 32-bit applications.
Do not wait 5 seconds to give the user the option of using KERNEL_BITS=32
Do not accept the KERNEL_BITS=32 option

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17675)

util/perl/OpenSSL/config.pm

index fd4cce3c258f5278c73e189046f2b06bdbd0fdd4..cb2f5097a8bbd1ea42303fb5e22042232b42970d 100755 (executable)
@@ -485,6 +485,14 @@ EOF
       [ 'x86_64-apple-darwin.*',
         sub {
             my $KERNEL_BITS = $ENV{KERNEL_BITS} // '';
+            # macOS >= 10.15 is 64-bit only
+            my $SW_VERS = `sw_vers -productVersion 2>/dev/null`;
+            if ($SW_VERS =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+                if ($1 > 10 || ($1 == 10 && $2 >= 15)) {
+                    die "32-bit applications not supported on macOS 10.15 or later\n" if $KERNEL_BITS eq '32';
+                    return { target => "darwin64-x86_64" };
+                }
+            }
             return { target => "darwin-i386" } if $KERNEL_BITS eq '32';
 
             print <<EOF;