add dawrin-aarch64 (arm64) Host Arch
This commit is contained in:
14
configure/os/CONFIG.Common.darwin-aarch64
Normal file
14
configure/os/CONFIG.Common.darwin-aarch64
Normal file
@ -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
|
8
configure/os/CONFIG.darwin-aarch64.Common
Normal file
8
configure/os/CONFIG.darwin-aarch64.Common
Normal file
@ -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
|
9
configure/os/CONFIG_SITE.Common.darwin-aarch64
Normal file
9
configure/os/CONFIG_SITE.Common.darwin-aarch64
Normal file
@ -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
|
@ -46,8 +46,9 @@ sub HostArch {
|
|||||||
my ($kernel, $hostname, $release, $version, $cpu) = uname;
|
my ($kernel, $hostname, $release, $version, $cpu) = uname;
|
||||||
if (m/^darwin/) {
|
if (m/^darwin/) {
|
||||||
for ($cpu) {
|
for ($cpu) {
|
||||||
return 'darwin-x86' if m/^(i386|x86_64)/;
|
return 'darwin-x86' if m/^(i386|x86_64)/;
|
||||||
return 'darwin-ppc' if m/Power Macintosh/;
|
return 'darwin-ppc' if m/Power Macintosh/;
|
||||||
|
return 'darwin-aarch64' if m/arm64/;
|
||||||
}
|
}
|
||||||
die "$0: macOS CPU type '$cpu' not recognized\n";
|
die "$0: macOS CPU type '$cpu' not recognized\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user