bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#748361: m4: build tests are failing on ppc64el


From: Santiago Vila
Subject: Bug#748361: m4: build tests are failing on ppc64el
Date: Fri, 16 May 2014 17:52:15 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello.

I received the following report from the Debian bug system.
[ Please keep the Cc: lines when replying. Thanks ].

----- Forwarded message from Erwan Prioul <address@hidden> -----

Date: Fri, 16 May 2014 16:56:11 +0200
From: Erwan Prioul <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Subject: Bug#748361: m4: build tests are failing on ppc64el

Package: m4
Version: 1.4.17-2
Severity: normal
Tags: upstream patch

Dear Maintainer,

I've noticed build tests are failing on ppc64el.

In Ubuntu, the attached patch was applied to fix the issue (Fix
detection of floating point endianness).

Thanks for considering the patch.

Erwan Prioul.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.13-1-powerpc64le (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information


Description: Fix detection of floating point endianness
 See https://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00104.html
Author: Alan Modra <address@hidden>
Author: Colin Watson <address@hidden>
Forwarded: no
Last-Update: 2013-12-18

Index: b/tests/test-isnanl.h
===================================================================
--- a/tests/test-isnanl.h
+++ b/tests/test-isnanl.h
@@ -24,6 +24,12 @@
 #include "nan.h"
 #include "macros.h"
 
+#ifdef __FLOAT_WORD_ORDER__
+# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
+#else
+# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
+#endif
+
 int
 main ()
 {
@@ -56,10 +62,10 @@
 # if LDBL_EXPBIT0_BIT > 0
     m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
 # else
-    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+    m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
       ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
 # endif
-    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+    m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
       |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
     ASSERT (isnanl (m.value));
   }
Index: b/tests/test-signbit.c
===================================================================
--- a/tests/test-signbit.c
+++ b/tests/test-signbit.c
@@ -36,6 +36,12 @@
 double zerod = 0.0;
 long double zerol = 0.0L;
 
+#ifdef __FLOAT_WORD_ORDER__
+# define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
+#else
+# define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
+#endif
+
 static void
 test_signbitf ()
 {
@@ -156,10 +162,10 @@
 # if LDBL_EXPBIT0_BIT > 0
     m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
 # else
-    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+    m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
       ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
 # endif
-    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+    m.word[LDBL_EXPBIT0_WORD + (FLOAT_BIG_ENDIAN ? 1 : - 1)]
       |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
     (void) signbit (m.value);
     #undef NWORDS



----- End forwarded message -----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]