php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 191919 at gmail dot com
New email:
PHP Version: OS:

 

 [2015-06-25 08:14 UTC] 191919 at gmail dot com
Description:
------------
-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.
   ^

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-25 08:50 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-06-25 08:50 UTC] laruence@php.net
from what I read in http://sqlite.1065341.n5.nabble.com/GCC-ffast-math-safe-version-of-sqlite3IsNaN-td41243.html , 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..

thanks
 [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-2022 The PHP Group
All rights reserved.
Last updated: Sun Sep 25 17:05:53 2022 UTC