[libdbi/f12/master] Do not use -ffast-math.

Tom Lane tgl at fedoraproject.org
Sat Sep 4 00:15:56 UTC 2010


commit f25a009fd08f4a5162ae831afdbb807c1e15df29
Author: Tom Lane <tgl at redhat.com>
Date:   Fri Sep 3 20:15:54 2010 -0400

    Do not use -ffast-math.

 libdbi-cflags.patch |    6 ++++--
 libdbi.spec         |    7 ++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libdbi-cflags.patch b/libdbi-cflags.patch
index 19f41d6..bea7565 100644
--- a/libdbi-cflags.patch
+++ b/libdbi-cflags.patch
@@ -1,4 +1,6 @@
-Ensure desirable compile flags are used.
+Ensure desirable compile flags are used.  We want RPM_OPT_FLAGS rather than
+upstream's idea of suitable optimization flags, per Fedora packaging
+guidelines, and we *don't* want -ffast-math, per bug #629964.
 
 
 diff -Naur libdbi-0.8.2.orig/configure.in libdbi-0.8.2/configure.in
@@ -9,7 +11,7 @@ diff -Naur libdbi-0.8.2.orig/configure.in libdbi-0.8.2/configure.in
          *-*-linux*)
                  DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char -std=gnu99"
 -                CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99"
-+                CFLAGS="-ffast-math -D_REENTRANT -fsigned-char -std=gnu99 $RPM_OPT_FLAGS"
++                CFLAGS="-D_REENTRANT -fsigned-char -std=gnu99 $RPM_OPT_FLAGS"
                  PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99";;
          sparc-sun-*)
                  DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99"
diff --git a/libdbi.spec b/libdbi.spec
index 8fe28ae..f217c9b 100644
--- a/libdbi.spec
+++ b/libdbi.spec
@@ -1,7 +1,7 @@
 Summary: Database Independent Abstraction Layer for C
 Name: libdbi
 Version: 0.8.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: Development/Libraries
 License: LGPLv2+
 URL: http://libdbi.sourceforge.net/
@@ -78,6 +78,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libdbi.la
 %{_libdir}/libdbi.so
 
 %changelog
+* Fri Sep  3 2010 Tom Lane <tgl at redhat.com> 0.8.3-4
+- Do not use -ffast-math; it breaks things and seems quite unlikely to offer
+  any useful performance benefit for this type of package, anyway
+Resolves: #629964
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.3-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


More information about the scm-commits mailing list