Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Cave-Ayland <mark(dot)cave-ayland(at)siriusit(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Date: 2011-12-14 19:49:11
Message-ID: 4EE8FDB7.2010106@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/14/2011 11:14 AM, Tom Lane wrote:
> -ffloat-store is a brute force solution, I think, and would affect old
> versions of gcc that don't exhibit any problems. I would suggest
> altering configure to see whether the compiler recognizes
> -fexcess-precision=standard and adding that to CFLAGS if so.

OK, this and the associated configure change seems to do the trick:

diff --git a/configure.in b/configure.in
index 9cf084d..b29bb61 100644
--- a/configure.in
+++ b/configure.in
@@ -437,6 +437,8 @@ if test "$GCC" = yes -a "$ICC" = no; then
PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
# Disable optimizations that assume no overflow; needed for gcc 4.3+
PGAC_PROG_CC_CFLAGS_OPT([-fwrapv])
+ # Disable FP optimizations that cause isinf errors on gcc 4.5+
+ PGAC_PROG_CC_CFLAGS_OPT([-fexcess-precision=standard])
elif test "$ICC" = yes; then
# Intel's compiler has a bug/misoptimization in checking for
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the
CFLAGS.

I guess we should backpatch it?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Krogh 2011-12-14 19:50:01 Re: SP-GiST versus index-only scans
Previous Message Tom Lane 2011-12-14 18:48:22 Re: SP-GiST versus index-only scans