+2017-06-08 Bruno Haible <bruno@clisp.org>
+
+ host-cpu-c-abi: Support for aarch64 ILP32 ABI.
+ * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the aarch64 ILP32
+ ABI. Set HOST_CPU_C_ABI=arm64-ilp32 and define __arm64_ilp32__ in this
+ case.
+
2017-06-08 Paul Eggert <eggert@cs.ucla.edu>
doc: remove robots, add prereqs
-# host-cpu-c-abi.m4 serial 3
+# host-cpu-c-abi.m4 serial 4
dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
arm* | aarch64 )
# Assume arm with EABI.
- # On arm64, the C compiler may be generating 64-bit (= aarch64) code
- # or 32-bit (= arm) code.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
AC_EGREP_CPP([yes],
[#if defined(__aarch64__) || defined(__ARM_64BIT_STATE) || defined(__ARM_PCS_AAPCS64)
yes
#endif],
- [gl_cv_host_cpu_c_abi=arm64],
+ [AC_EGREP_CPP([yes],
+ [#if defined __ILP32__ || defined _ILP32
+ yes
+ #endif],
+ [gl_cv_host_cpu_c_abi=arm64-ilp32],
+ [gl_cv_host_cpu_c_abi=arm64])],
[# Don't distinguish little-endian and big-endian arm, since they
# don't require different machine code for simple operations and
# since the user can distinguish them through the preprocessot
#ifndef __armhf__
#undef __armhf__
#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
#ifndef __arm64__
#undef __arm64__
#endif