|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69928 -ffast-math incompatible with sqlite extension
Submitted: 2015-06-25 08:14 UTC Modified: 2015-07-05 04:22 UTC
From: 191919 at gmail dot com Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 7.0Git-2015-06-25 (Git) OS: OS X
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-06-25 08:14 UTC] 191919 at gmail dot com
-ffast-math brings performance increase and the precision can be accepted in most cases, but php cannot be compiled with this directive.

Would you please consider to add an extra ./configure setting to skip the check in sqlite3 extension as it is the only one that explicitly refuses the -ffast-math flag?

Test script:
CC=/opt/bin/gcc CFLAGS="-O2 -msse4.2 -ffast-math -fomit-frame-pointer -fno-stack-protector -fno-exceptions" ./configure --prefix=/opt/php7 --enable-opcache

Expected result:
Compilation succeeds.

Actual result:
gcc-5.1.0 gave:

/Users/xx/box/php-src/ext/sqlite3/libsqlite/sqlite3.c:23512:3: error: #error SQLite will not work correctly with the -ffast-math option of GCC.
 # error SQLite will not work correctly with the -ffast-math option of GCC.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-25 08:50 UTC]
-Status: Open +Status: Feedback
 [2015-06-25 08:50 UTC]
from what I read in , no we can not do much thing on this.

but you may try to build php without sqlite and enable fast-math.

then build sqlite as a shared object without fast-math..

 [2015-07-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 08:01:24 2023 UTC