From 34a0b387b0273094cd241b839dc931f97c338b6c Mon Sep 17 00:00:00 2001 From: Jeong Han Lee Date: Tue, 2 Feb 2021 17:26:12 -0800 Subject: [PATCH 1/2] add dawrin-aarch64 (arm64) Host Arch --- configure/os/CONFIG.Common.darwin-aarch64 | 14 ++++++++++++++ configure/os/CONFIG.darwin-aarch64.Common | 8 ++++++++ configure/os/CONFIG_SITE.Common.darwin-aarch64 | 9 +++++++++ src/tools/EpicsHostArch.pl | 5 +++-- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 configure/os/CONFIG.Common.darwin-aarch64 create mode 100644 configure/os/CONFIG.darwin-aarch64.Common create mode 100644 configure/os/CONFIG_SITE.Common.darwin-aarch64 diff --git a/configure/os/CONFIG.Common.darwin-aarch64 b/configure/os/CONFIG.Common.darwin-aarch64 new file mode 100644 index 000000000..639d79b68 --- /dev/null +++ b/configure/os/CONFIG.Common.darwin-aarch64 @@ -0,0 +1,14 @@ +# CONFIG.Common.darwin-aarch64 +# +# This file is maintained by the build community. +# +# Definitions for darwin-ppc target builds +# Sites may override these definitions in CONFIG_SITE.Common.darwin-ppc +#------------------------------------------------------- + +# +# To build universal binaries, configure ARCH_CLASS +# in the file CONFIG_SITE.Common.darwin-aarch64 + +# Include definitions common to all Darwin targets +include $(CONFIG)/os/CONFIG.darwinCommon.darwinCommon diff --git a/configure/os/CONFIG.darwin-aarch64.Common b/configure/os/CONFIG.darwin-aarch64.Common new file mode 100644 index 000000000..0be8d68fe --- /dev/null +++ b/configure/os/CONFIG.darwin-aarch64.Common @@ -0,0 +1,8 @@ +# CONFIG.darwin-aarch64.Common +# +# Definitions for darwin-aarch64 host builds +# Sites may override these definitions in CONFIG_SITE.darwin-aarch64.Common +#------------------------------------------------------- + +#Include definitions common to unix hosts +include $(CONFIG)/os/CONFIG.UnixCommon.Common diff --git a/configure/os/CONFIG_SITE.Common.darwin-aarch64 b/configure/os/CONFIG_SITE.Common.darwin-aarch64 new file mode 100644 index 000000000..8d79eb16e --- /dev/null +++ b/configure/os/CONFIG_SITE.Common.darwin-aarch64 @@ -0,0 +1,9 @@ +# CONFIG_SITE.Common.darwin-aarch64 +# +# Site override definitions for darwin-aarch64 target builds +#------------------------------------------------------- + +# +# arm64 devices: Apple Silicon M1 + +ARCH_CLASS = arm64 diff --git a/src/tools/EpicsHostArch.pl b/src/tools/EpicsHostArch.pl index d1508bf0e..52c427253 100644 --- a/src/tools/EpicsHostArch.pl +++ b/src/tools/EpicsHostArch.pl @@ -46,8 +46,9 @@ sub HostArch { my ($kernel, $hostname, $release, $version, $cpu) = uname; if (m/^darwin/) { for ($cpu) { - return 'darwin-x86' if m/^(i386|x86_64)/; - return 'darwin-ppc' if m/Power Macintosh/; + return 'darwin-x86' if m/^(i386|x86_64)/; + return 'darwin-ppc' if m/Power Macintosh/; + return 'darwin-aarch64' if m/arm64/; } die "$0: macOS CPU type '$cpu' not recognized\n"; } From d3e96c4c2b02606d952739db17e7e3d0811efc80 Mon Sep 17 00:00:00 2001 From: Jeong Han Lee Date: Fri, 5 Feb 2021 17:02:54 -0800 Subject: [PATCH 2/2] fixed a typo in CONFIG.Common.darwin-aarch64 --- configure/os/CONFIG.Common.darwin-aarch64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure/os/CONFIG.Common.darwin-aarch64 b/configure/os/CONFIG.Common.darwin-aarch64 index 639d79b68..eaba1efb2 100644 --- a/configure/os/CONFIG.Common.darwin-aarch64 +++ b/configure/os/CONFIG.Common.darwin-aarch64 @@ -2,8 +2,8 @@ # # This file is maintained by the build community. # -# Definitions for darwin-ppc target builds -# Sites may override these definitions in CONFIG_SITE.Common.darwin-ppc +# Definitions for darwin-aarch64 target builds +# Sites may override these definitions in CONFIG_SITE.Common.darwin-aarch64 #------------------------------------------------------- #