[Beignet] how about we remove the -ffast-math compiler flag

Zhigang Gong zhigang.gong at linux.intel.com
Mon Apr 15 20:28:31 PDT 2013


Guanqun,

This seems a known bug on FC16 platform, here is the link:
https://bugzilla.redhat.com/show_bug.cgi?id=795995

Anyway, I'm ok to remove this flag. So please submit your patch.

> -----Original Message-----
> From:
> beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.
> org] On Behalf Of Lu, Guanqun
> Sent: Tuesday, April 16, 2013 10:52 AM
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] how about we remove the -ffast-math compiler flag
> 
> Hi list,
> 
> as our cl runtime doesn't take lots of math heavy computation, how about
> we release the contraints of using fast-math for our compiler, when I'm
> compiling beignet using gcc 4.7.3, it has the following errors:
> 
> Scanning dependencies of target gbe
> [  1%] Building CXX object
> backend/src/CMakeFiles/gbe.dir/ocl_stdlib_str.cpp.o
> [  1%] Building CXX object
> backend/src/CMakeFiles/gbe.dir/ocl_common_defines_str.cpp.o
> [  2%] Building CXX object
> backend/src/CMakeFiles/gbe.dir/sys/intrusive_list.cpp.o
> In file included from /usr/include/math.h:423:0,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/cmath:46,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/random:3
> 8,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_
al
> go.h:67,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/algorithm
:
> 63,
>                  from /root/beignet/backend/src/./sys/alloc.hpp:29,
>                  from
> /root/beignet/backend/src/./sys/platform.hpp:345,
>                  from
> /root/beignet/backend/src/sys/intrusive_list.hpp:26,
>                  from
> /root/beignet/backend/src/sys/intrusive_list.cpp:23:
> /usr/include/bits/math-finite.h:25:53: error: declaration of 'double
> acos(double)' has a different exception specifier In file included from
> /usr/include/math.h:71:0,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/cmath:46,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/random:3
> 8,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_
al
> go.h:67,
>                  from
>
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/algorithm
:
> 63,
> 
> But removing the -ffast-math solves the issue.
> 
> If you think this is a good idea, I can send out a simple patch.
> 
> Thanks!
> --guanqun
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet



More information about the Beignet mailing list