]> Savannah Git Hosting - gnulib.git/commitdiff
host-cpu-c-abi: Add support for unknown CPUs.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Nov 2019 22:56:51 +0000 (23:56 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 17 Nov 2019 22:56:51 +0000 (23:56 +0100)
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
32-bit or 64-bit.

ChangeLog
m4/host-cpu-c-abi.m4

index 549152c2b8ab0777eafc2d27a8839c8259da3b1d..45eacfe27416d2e7dc7d021526df2dd65c5670f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-11-17  Bruno Haible  <bruno@clisp.org>
+
+       host-cpu-c-abi: Add support for unknown CPUs.
+       * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
+       gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
+       32-bit or 64-bit.
+
 2019-11-17  Bruno Haible  <bruno@clisp.org>
 
        havelib: Remove redundant code.
index af8c05cad72ca6d9c5b1a6d44b3712163fe65ca1..6fc31bc0073c99de589ca625c2b66f42f5df63b4 100644 (file)
@@ -1,4 +1,4 @@
-# host-cpu-c-abi.m4 serial 12
+# host-cpu-c-abi.m4 serial 13
 dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -457,7 +457,8 @@ EOF
 
 
 dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
-dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
 dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
 AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
 [
@@ -467,8 +468,10 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
        case "$gl_cv_host_cpu_c_abi" in
          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
            gl_cv_host_cpu_c_abi_32bit=yes ;;
-         *)
+         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
            gl_cv_host_cpu_c_abi_32bit=no ;;
+         *)
+           gl_cv_host_cpu_c_abi_32bit=unknown ;;
        esac
      else
        case "$host_cpu" in
@@ -493,6 +496,14 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
            gl_cv_host_cpu_c_abi_32bit=yes
            ;;
 
+         # CPUs that only support a 64-bit ABI.
+changequote(,)dnl
+         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+         | mmix )
+changequote([,])dnl
+           gl_cv_host_cpu_c_abi_32bit=no
+           ;;
+
 changequote(,)dnl
          i[34567]86 )
 changequote([,])dnl
@@ -654,7 +665,7 @@ changequote([,])dnl
            ;;
 
          *)
-           gl_cv_host_cpu_c_abi_32bit=no
+           gl_cv_host_cpu_c_abi_32bit=unknown
            ;;
        esac
      fi