-ffast-math + Mesa

Kevin Day thekevinday at gmail.com
Thu Sep 7 18:10:25 PDT 2006


On 9/7/06, Alex Merry <alexander.merry at ccc.ox.ac.uk> wrote:
> On Thu, Sep 07, 2006 at 10:33:52PM +0400, Vladimir A. Pavlov wrote:
> > Everything seems ok except -fmath-errno doesn't work as expected.
> > gcc-4.1.1 was built directly from gcc.gnu.org without any patches.
>
> What were you expecting it to do? As I understand it, -fmath-errno is
> the default. -fno-math-errno should change the result of the program
> without -ffast-math.
>
> If I do "gcc -fno-math-errno -lm a.c; ./a.out", I get 0.
>
> Alex :-)
>

I noticed some documentation that stated -ffast-math passed
-fno-math-errno and was curious if I could get -ffast-math to create
errno (though, I am aware that they passed -fno-math-errno for a
reason with -ffast-math, I'm merely curious on this matter).

However, I am having trouble with errno, so I will see if uClibc
doesn't support it (in 0.9.28 at least).  I will also have to look
into all of the patches applied and see whats going on.  In addition,
I'll start switching to the new/recommended uClibc which I haven't
jumped over to yet as well as try the (proven) faster overall gcc-3.4.


> I run the test from Gentoo machine. Gentoo patch makes uname just read
> the processor name from /proc/cpuinfo so Gentoo version of uname depends
> on /proc that's what I don't like.
I can see problems with it, when proc is not mounted, but I love the
fact that this method removes redundancy be re-using information that
is already allocated in memory.
I have also seen programs segfault for not checking whether the proc
directory is mounted before accessing contents.  (specifically the
wonderful htop program - I should probably submit a bug report to them
about that..)

Perhaps the patch can be modified (at the cost of code size) to check
for /proc, if that fails, use the method from the uname-1.patch.

-- 
Kevin Day



More information about the hlfs-dev mailing list