>From d3603f83124c4c51a366633d11f628723b1aa128 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 17 Nov 2019 23:56:51 +0100 Subject: [PATCH 2/4] 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. --- ChangeLog | 7 +++++++ m4/host-cpu-c-abi.m4 | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 549152c..45eacfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2019-11-17 Bruno Haible + 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 + havelib: Remove redundant code. * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Remove Solaris specific test for 64-bit host. Use gl_HOST_CPU_C_ABI_32BIT result instead. diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4 index af8c05c..6fc31bc 100644 --- a/m4/host-cpu-c-abi.m4 +++ b/m4/host-cpu-c-abi.m4 @@ -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 -- 2.7.4