Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64 - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Date
Msg-id 4EE8FDB7.2010106@dunslane.net
Whole thread Raw
In response to Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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])   +  #
DisableFP 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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Race condition in HEAD, possibly due to PGPROC splitup
Next
From: Jesper Krogh
Date:
Subject: Re: SP-GiST versus index-only scans