From 9bd1b4e854f84d13c21253b420d968c899cf7f65 Mon Sep 17 00:00:00 2001 From: skyamgarp <130442619+skyamgarp@users.noreply.github.com> Date: Thu, 17 Aug 2023 13:54:20 +0530 Subject: [PATCH] (PE-36622) Build client-tools-runtime-main for macOS 13 (ARM) --- configs/projects/_shared-client-tools-runtime.rb | 13 ++++++++++--- configs/projects/client-tools-runtime-main.rb | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configs/projects/_shared-client-tools-runtime.rb b/configs/projects/_shared-client-tools-runtime.rb index 3b2a4bfde..a4d95b145 100644 --- a/configs/projects/_shared-client-tools-runtime.rb +++ b/configs/projects/_shared-client-tools-runtime.rb @@ -23,9 +23,11 @@ # We need to explicitly define 1.1.1k here to avoid # build dep conflicts between openssl-1.1.1 needed by curl # and krb5-devel -if platform.name =~ /^redhatfips-8/ +if proj.settings[:openssl_version] + # already defined in the project +elsif platform.name =~ /^redhatfips-8/ proj.setting(:openssl_version, '1.1.1k') -else +else proj.setting(:openssl_version, '1.1.1') end @@ -77,6 +79,8 @@ # The core2 architecture is not available on M1 Macs proj.setting(:cflags, "#{proj.cppflags}") proj.setting(:host, "--host aarch64-apple-darwin --build x86_64-apple-darwin --target aarch64-apple-darwin") + elsif platform.architecture == 'arm64' + proj.setting(:cflags, "#{proj.cppflags}") else proj.setting(:cflags, "-march=core2 -msse4 #{proj.cppflags}") end @@ -102,7 +106,10 @@ # Common deps proj.component "runtime-client-tools" -if platform.name =~ /^redhatfips-.*/ + +if proj.settings[:openssl_version] + proj.component "openssl-#{proj.openssl_version}" +elsif platform.name =~ /^redhatfips-.*/ proj.component "openssl-1.1.1-fips" else proj.component "openssl-#{proj.openssl_version}" diff --git a/configs/projects/client-tools-runtime-main.rb b/configs/projects/client-tools-runtime-main.rb index 6cc5ab4f6..3447eb012 100644 --- a/configs/projects/client-tools-runtime-main.rb +++ b/configs/projects/client-tools-runtime-main.rb @@ -1,4 +1,6 @@ project 'client-tools-runtime-main' do |proj| + proj.setting(:openssl_version, '3.0') + # Common settings instance_eval File.read(File.join(File.dirname(__FILE__), '_shared-client-tools-runtime.rb')) end