[grep] Fixed build failure on ppc - long double forced to double on ppc

Jaroslav Škarvada jskarvad at fedoraproject.org
Mon Jul 4 15:25:12 UTC 2011


commit 21e97bf94c215eca849aeeec3e5ccfb240f7fe47
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Mon Jul 4 17:24:58 2011 +0200

    Fixed build failure on ppc - long double forced to double on ppc

 grep.spec |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/grep.spec b/grep.spec
index 36be668..1e6812f 100644
--- a/grep.spec
+++ b/grep.spec
@@ -3,7 +3,7 @@
 Summary: Pattern matching utilities
 Name: grep
 Version: 2.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv3+
 Group: Applications/Text
 Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
@@ -28,7 +28,17 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
 %setup -q
 
 %build
-%configure --without-included-regex CPPFLAGS="-I%{_includedir}/pcre"
+%global BUILD_FLAGS $RPM_OPT_FLAGS
+
+# Currently gcc on ppc uses double-double arithmetic for long double and it
+# does not conform to the IEEE floating-point standard. Thus force
+# long double to be double and conformant.
+%ifarch ppc ppc64
+%global BUILD_FLAGS %{BUILD_FLAGS} -mlong-double-64
+%endif
+
+%configure --without-included-regex CPPFLAGS="-I%{_includedir}/pcre" \
+  CFLAGS="%{BUILD_FLAGS}"
 make %{?_smp_mflags}
 
 %install
@@ -67,6 +77,9 @@ fi
 %{_mandir}/*/*
 
 %changelog
+* Mon Jul 04 2011 Jaroslav Škarvada <jskarvad at redhat.com> - 2.9-2
+- Fixed build failure on ppc - long double forced to double on ppc
+
 * Wed Jun 22 2011 Jaroslav Škarvada <jskarvad at redhat.com> - 2.9-1
 - New version: grep-2.9
 - Removed dfa-buffer-overrun-fix patch


More information about the scm-commits mailing list