Re: OpenBSD/Sparc status - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject Re: OpenBSD/Sparc status
Date
Msg-id 41A37EE8.7020905@kaltenbrunner.cc
Whole thread Raw
In response to Re: OpenBSD/Sparc status  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Darcy Buskermolen <darcy@wavefire.com> writes:
> 
>>I can confirm this behavior on Solaris 8/sparc 64 as well.
> 
> 
>>bash-2.03$ gcc -m64 -O2 test.c
>>bash-2.03$ ./a.out 
>>x = 12.3
>>y = 2.51673e-42
>>bash-2.03$ gcc -m64 -O3 test.c
>>bash-2.03$ ./a.out 
>>x = 12.3
>>y = 12.3
>>bash-2.03$ 
> 
> 
> Hmm.  I hadn't bothered to try -O3 ... interesting that it works
> correctly again at that level.

-O3 works on my box too

> 
> Anyway, this proves that it is an upstream gcc bug and not something
> OpenBSD broke.

I just tried on solaris9 with gcc 3.4.2 - seems the bug is fixed in this  version. Unfortunably it is quite problematic
tochange the compiler 
 
at least on OpenBSD gcc 3.3.2 is quite heavily modified on that platform 
and switching the base system compiler might screw a boatload of other 
tools.
The actual recommendation I got from the OpenBSD-folks was to add 
"-mfaster-structs" to the compiler flags with seems to work around the 
issue - I'm currently doing a full build to verify that though ...


Stefan


pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: another plperl bug
Next
From: Michael Fuhr
Date:
Subject: Re: OpenBSD/Sparc status