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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
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 16:14:14
Message-ID: 8908.1323879254@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> Done and done (see
>>> <https://sourceforge.net/tracker/?func=detail&aid=3458244&group_id=202880&atid=983354>).

>> Did you see Kai's update on the ticket? If this is the case, I know
>> that we have seen similar bugs with PostGIS and the work-around has
>> been to add -ffloat-store to the compiler flags for the affected files
>> if that helps?

> Hmm. Yeah, if I remove -O0 and instead set CFLAGS to -ffloat-store the
> error goes away.

Hmm, we have been bit by that recently elsewhere:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ff68b256a533b398e3420750f34d161aeee4e099

I suspect what you are looking at is not at all mingw-specific but will
soon start showing up on other x86 platforms. I see from the bug report
that that's gcc 4.7.0, which hasn't made it into most distros yet but
surely will soon.

> So, would we want to use that just for this file, or for the whole build?

-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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2011-12-14 16:36:21 Re: pg_dump --exclude-table-data
Previous Message Thomas Munro 2011-12-14 16:11:32 Re: NOTIFY with tuples