Skip to content

Compiler flag gets erroneously removed #15826

Closed
@nielsdos

Description

@nielsdos

Description

When compiling with:

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 8.2

Operating System

Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions