]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] gcc: configure: Fix the optimization flags cleanup
authorSlava Barinov <v.barinov@samsung.com>
Sun, 1 Dec 2024 18:59:13 +0000 (11:59 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 1 Dec 2024 18:59:13 +0000 (11:59 -0700)
commit721a38add973a937b4b60f05cfa17958e892ad27
treec7f379776b505171768b7c6318e0b126c8e35b0a
parent999aad44aa86e64580d36e74bcc90b48f768cf55
[PATCH] gcc: configure: Fix the optimization flags cleanup

Currently sed command in flag cleanup removes all the -O[0-9] flags, ignoring
the context. This leads to issues when the optimization flags is passed to
linker:

CFLAGS="-Os -Wl,-O1 -Wl,--hash-style=gnu"
is converted into
CFLAGS="-Os -Wl,-Wl,--hash-style=gnu"

Which leads to configure failure with ld: unrecognized option '-Wl,-Wl'.

gcc/
* configure.ac: Only remove -O[0-9] if not preceded with comma
* configure: Regenerated
gcc/configure
gcc/configure.ac