Skip to content

Commit

Permalink
build: make: Another configure.py update for Apple Silicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleysepos authored and galad87 committed Aug 5, 2020
1 parent 19e4d89 commit 36ed8f5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions make/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ def _parseSession( self ):
self.release = self[3]
self.extra = self[4]

## special mapping for Apple Silicon
## config.guess returns aarch64, we need arm64
if self.vendor is 'apple' and self.system is 'darwin':
if self.machine is 'aarch64':
self[0] = self.machine = 'arm64'

## nice formal name for 'system'
self.systemf = platform.system()

Expand Down Expand Up @@ -575,6 +581,12 @@ def setHost( self, cross ):
self.extra = self[4]
self.systemf = build_tuple.systemf

## special mapping for Apple Silicon
## config.guess returns aarch64, we need arm64
if self.vendor is 'apple' and self.system is 'darwin':
if self.machine is 'aarch64':
self[0] = self.machine = 'arm64'

try:
self.machine = arch.mode.mode
except NameError:
Expand Down Expand Up @@ -674,8 +686,8 @@ def _action( self ):
elif host_tuple.match( '*-*-mingw*' ):
pass
elif host_tuple.match( '*-*-darwin*' ):
self.mode['x86_64'] = 'x86_64-apple-darwin%s' % (host_tuple.release)
self.mode['arm64'] = 'aarch64-apple-darwin%s' % (host_tuple.release)
self.mode['arm64'] = 'arm64-apple-darwin%s' % (host_tuple.release)
self.mode['x86_64'] = 'x86_64-apple-darwin%s' % (host_tuple.release)
elif host_tuple.match( '*-*-linux*' ):
pass
elif host_tuple.match( '*-*-solaris*' ):
Expand Down

0 comments on commit 36ed8f5

Please sign in to comment.