[php-src] Issue #15826: Compiler flag gets erroneously removed
| From: | nielsdos | Date: | Tue, 10 Sep 2024 12:04:34 +0000 |
| Subject: | [php-src] Issue #15826: Compiler flag gets erroneously removed | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247743@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15826
Author: nielsdos
### Description
When compiling with:
```sh
export CFLAGS="-Xclang -disable-O0-optnone"
./configure --enable-debug
```
The Xclang command passed to the compiler is
-Xclang -disable-O0-optnone, i.e. the
-O0 gets removed.
I know there's some compiler optimization flag sanitization happening somewhere, but in this
case it's breaking legit usage.
The workaround I used in the end was adding -O0 to CFLAGS and removing
--enable-debug from the configure command.
### PHP Version
master
### Operating System
_No response_