Skip to content

Commit

Permalink
Update config scripts to compile for Apple Silicon (arm64)
Browse files Browse the repository at this point in the history
Detect Apple Silicon (arm64) during configuration for compilation
on macOS 11.0 (beta at this time).
  • Loading branch information
markpeek committed Jul 29, 2020
1 parent 27fa9fb commit e132812
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ armv7l-unknown-linux-gnueabihf
i686-pc-linux-gnu
x86_64-unknown-linux-gnu
i386-apple-darwin[0-9]*.[0-9]*.[0-9]*
arm-apple-darwin[0-9]*.[0-9]*.[0-9]*
x86_64-apple-darwin[0-9]*.[0-9]*.[0-9]*
x86_64-unknown-freebsd[0-9]*.[0-9]*
sparc-sun-solaris[0-9]*.[0-9]*
Expand Down
4 changes: 4 additions & 0 deletions erts/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2071,6 +2071,9 @@ case "$THR_LIB_NAME" in
macppc | ppc | powerpc | "Power Macintosh")
ethr_native_atomic_implementation=ethread
ethr_have_native_atomics=yes;;
arm64)
ethr_native_atomic_implementation=ethread
ethr_have_native_atomics=yes;;
tile)
ethr_native_atomic_implementation=ethread
ethr_have_native_atomics=yes;;
Expand Down Expand Up @@ -2822,6 +2825,7 @@ AC_DEFUN([LM_HARDWARE_ARCH], [
ppc64) ARCH=ppc64;;
ppc64le) ARCH=ppc64le;;
"Power Macintosh") ARCH=ppc;;
arm64) ARCH=arm64;;
armv5b) ARCH=arm;;
armv5teb) ARCH=arm;;
armv5tel) ARCH=arm;;
Expand Down
2 changes: 1 addition & 1 deletion erts/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ dnl First remove common_tests skip file.

dnl Adjust LDFLAGS to allow 64bit linkage on DARWIN
case $ARCH-$OPSYS in
amd64-darwin*)
amd64-darwin*|arm64-darwin*)
AC_MSG_NOTICE([Adjusting LDFLAGS to cope with 64bit Darwin])
case $LDFLAGS in
*-m64*)
Expand Down
2 changes: 1 addition & 1 deletion make/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ if test $CROSS_COMPILING = no; then
}
[case "$macosx_version" in
[1-9][0-9].[0-9])
int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\1\2|'`;;
int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)|\10\200|'`;;
[1-9][0-9].[0-9].[0-9])
int_macosx_version=`echo $macosx_version | sed 's|\([^\.]*\)\.\([^\.]*\)\.\([^\.]*\)|\1\2\3|'`;;
[1-9][0-9].[1-9][0-9])
Expand Down

0 comments on commit e132812

Please sign in to comment.