[Beignet] how about we remove the -ffast-math compiler flag
Xing, Homer
homer.xing at intel.com
Mon Apr 15 20:12:48 PDT 2013
I vote yes.
-----Original Message-----
From: beignet-bounces+homer.xing=intel.com at lists.freedesktop.org [mailto:beignet-bounces+homer.xing=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:38,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_algo.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:38,
from /usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../include/c++/4.7.3/bits/stl_algo.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