]> Savannah Git Hosting - gnulib.git/commitdiff
host-cpu-c-abi: Fix detection of MIPS ABI.
authorBruno Haible <bruno@clisp.org>
Wed, 19 Jul 2017 00:35:23 +0000 (02:35 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 19 Jul 2017 00:35:23 +0000 (02:35 +0200)
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the
ABI, not the CPU instruction set.

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

index c2e140f0f0757c6fa9e102e1a57512bfe00d4eb4..2a59e4907022af82c3f25ee25505cfc9d5a202ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-07-18  Bruno Haible  <bruno@clisp.org>
+
+       host-cpu-c-abi: Fix detection of MIPS ABI.
+       * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the
+       ABI, not the CPU instruction set.
+
 2017-07-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        explicit_bzero: new module
index a3a3d431a43bf4149d2131351717c374ba96dbb7..3017f6c891009b98a0305f341676da24adc066de 100644 (file)
@@ -1,4 +1,4 @@
-# host-cpu-c-abi.m4 serial 4
+# host-cpu-c-abi.m4 serial 5
 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,
@@ -146,12 +146,12 @@ changequote([,])dnl
             yes
             #endif],
            [gl_cv_host_cpu_c_abi=mips64],
-           [# Strictly speaking, the MIPS ABI (-32 or -n32) is independent
-            # from the CPU identification (-mips[12] or -mips[34]). But -n32
-            # is commonly used together with -mips3, and it's easier to test
-            # the CPU identification.
+           [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined, and
+            # _MIPS_SIM == _ABIN32.
+            # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined, and
+            # _MIPS_SIM == _ABIO32.
             AC_EGREP_CPP([yes],
-              [#if __mips >= 3
+              [#if defined _ABIN32
                yes
                #endif],
               [gl_cv_host_cpu_c_abi=mipsn32],