summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitezslav Crhonek <vcrhonek@redhat.com>2014-04-10 14:43:43 +0200
committerVitezslav Crhonek <vcrhonek@redhat.com>2014-04-10 14:43:43 +0200
commit17e2e0692e6a4afaea0b5869eec3bc934f69ac6e (patch)
tree6666fcab22661656bdab9810ccd7be321b9d7ae3
parent6790bdbb9b333e5fe6897435a24db6a3015c38ff (diff)
downloadm4-17e2e0692e6a4afaea0b5869eec3bc934f69ac6e.tar.gz
m4-17e2e0692e6a4afaea0b5869eec3bc934f69ac6e.tar.xz
m4-17e2e0692e6a4afaea0b5869eec3bc934f69ac6e.zip
Fix ppc64le test fails
-rw-r--r--m4-1.4.16-gnulib-gets.patch13
-rw-r--r--m4-1.4.16-readlink-einval.patch12
-rw-r--r--m4-1.4.17-gnulib-ppc64le.patch19
-rw-r--r--m4.spec10
4 files changed, 28 insertions, 26 deletions
diff --git a/m4-1.4.16-gnulib-gets.patch b/m4-1.4.16-gnulib-gets.patch
deleted file mode 100644
index 51df5b0..0000000
--- a/m4-1.4.16-gnulib-gets.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -up m4-1.4.16/lib/stdio.in.h.orig m4-1.4.16/lib/stdio.in.h
---- m4-1.4.16/lib/stdio.in.h.orig 2012-05-30 13:55:51.092600199 +0200
-+++ m4-1.4.16/lib/stdio.in.h 2012-05-30 13:56:25.763794100 +0200
-@@ -162,7 +162,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
- #undef gets
-+#if HAVE_RAW_DECL_GETS
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/m4-1.4.16-readlink-einval.patch b/m4-1.4.16-readlink-einval.patch
deleted file mode 100644
index 6a98751..0000000
--- a/m4-1.4.16-readlink-einval.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up m4-1.4.16/tests/test-readlink.h.orig m4-1.4.16/tests/test-readlink.h
---- m4-1.4.16/tests/test-readlink.h.orig 2011-09-19 12:44:58.745546826 +0200
-+++ m4-1.4.16/tests/test-readlink.h 2011-09-19 12:46:00.079548410 +0200
-@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char con
- ASSERT (errno == ENOENT);
- errno = 0;
- ASSERT (func ("", buf, sizeof buf) == -1);
-- ASSERT (errno == ENOENT);
-+ ASSERT (errno == ENOENT || errno == EINVAL);
- errno = 0;
- ASSERT (func (".", buf, sizeof buf) == -1);
- ASSERT (errno == EINVAL);
diff --git a/m4-1.4.17-gnulib-ppc64le.patch b/m4-1.4.17-gnulib-ppc64le.patch
new file mode 100644
index 0000000..698d5f4
--- /dev/null
+++ b/m4-1.4.17-gnulib-ppc64le.patch
@@ -0,0 +1,19 @@
+--- m4-1.4.17/tests/test-isnanl.h.ori
++++ m4-1.4.17/tests/test-isnanl.h
+@@ -51,6 +51,15 @@ main ()
+ /* A bit pattern that is different from a Quiet NaN. With a bit of luck,
+ it's a Signalling NaN. */
+ {
++#if defined __powerpc__ && LDBL_MANT_DIG == 106
++ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
++ represented as the corresponding 64-bit IEEE values in the first double;
++ the second is ignored. Manipulate only the first double. */
++ #undef NWORDS
++ #define NWORDS \
++ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
++#endif
++
+ memory_long_double m;
+ m.value = NaNl ();
+ # if LDBL_EXPBIT0_BIT > 0
+
diff --git a/m4.spec b/m4.spec
index c5638cc..50b5234 100644
--- a/m4.spec
+++ b/m4.spec
@@ -1,12 +1,15 @@
Summary: The GNU macro processor
Name: m4
Version: 1.4.17
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv3+
Group: Applications/Text
Source0: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz
Source1: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz.sig
URL: http://www.gnu.org/software/m4/
+# Patch0: Fixes math tests for little-endian PowerPC, rhbz#1083434
+# patch by Menanteau Guy and Ulrich Weigand
+Patch0: m4-1.4.17-gnulib-ppc64le.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: autoconf automake
@@ -29,6 +32,7 @@ Install m4 if you need a macro processor.
%prep
%setup -q
+%patch0 -p1 -b .gnulib-ppc64le
chmod 644 COPYING
%build
@@ -62,6 +66,10 @@ if [ "$1" = 0 ]; then
fi
%changelog
+* Thu Apr 10 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.17-4
+- Fix ppc64le test fails
+ Resolves: #1083434
+
* Mon Dec 09 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.17-3
- Buildrequire texinfo for ppc architecture
Resolves: #1038230