Req #79895 [NEW]: PHP_CHECK_GCC_ARG does not allow flags with equal (=) sign
| From: | santi at mola dot io | Date: | Fri, 24 Jul 2020 20:40:42 +0000 |
| Subject: | Req #79895 [NEW]: PHP_CHECK_GCC_ARG does not allow flags with equal (=) sign | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228217@lists.php.net to get a copy of this message | ||
From: santi at mola dot io
Operating system: Unix-like
PHP version: Irrelevant
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:PHP_CHECK_GCC_ARG does not allow flags with equal (=) sign
Description:
------------
The PHP_CHECK_GCC_ARG m4 macro in acinclude.m4 does not support flags
with equal (=) sign. This affects detection of flags like -std=gnu99 or
-fsanitize=address (clang).
I'm experiencing this on a private project, but I've seen at least one
open source project getting stuck there:
https://github.com/mongodb/mongo-php-driver/blob/c81330c0778a1bd6d314ad3fd7c5d397d5df1dcb/config.m4#L46
The patch is pretty simple, but unfortunately it is backwards
incompatible for projects that were (incorrectly) using this macro to
check -std=gnu99 support and were working without the check, since the
./configure call may succeed anyway but the flag will not be added. So
fixing this issue may cause problems in projects that are using the
macro for -std=gnu99 or similar and didn't realize the flag is not
added. I'm not sure if that kind of compatibility is supposed to be kept
at patch versions or if it would go to the next minor.
Test script:
---------------
PHP_CHECK_GCC_ARG(-std=gnu99, _CFLAGS="$_CFLAGS -std=gnu99")
Expected result:
----------------
$ phpize && ./configure
[...]
checking whether cc supports -std=gnu99... yes
[...]
Actual result:
--------------
$ phpize && ./configure
[...]
checking whether cc supports -std=gnu99... ./configure: line 4221:
gnu99+:: command not found
gnu99=yes=gnu99
[...]
--
Edit bug report at https://bugs.php.net/bug.php?id=79895&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79895&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79895&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79895&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79895&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79895&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79895&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79895&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79895&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79895&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79895&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79895&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79895&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79895&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79895&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79895&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79895&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79895&r=mysqlcfg