-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets #24633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets #24633
Conversation
…rackets The regex includes [/ ] which is supposed to match either a forward slash or a space, but m4 treats the brackets as special characters and effectively strips them out, leading to -isystem /usr/include paths except for in the typical scenario where it is the final parameter in the flag string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this PR rebased on master on Ubuntu 22.04:
$ ./configure --quiet --with-incompatible-bdb --enable-suppress-external-warnings CC=clang CXX=clang++
$ make
... massive Qt warnings
cc @vasild |
Tested 556ee6f. Still not working for me. Actually, my idea was to substitute paths like Btw, is there a decent reason why the base commit is so old? |
That's the original version... test the new one? (5a157eb)
The current PR code should do that (allowing for trailing slash(es) on the end). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5a157eb, tested on Ubuntu 22.04 with clang 14.0.
I merged this (5a157eb) on latest How to reproduce the problem this PR aims to solve? Why is the commit I am not sure whether the CI failure is related to this PR or not. |
I encountered it trying to test #24558 with
Otherwise we get warnings from Qt includes I guess. #24633 (review) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5a157eb
I checked that, without this PR, the generated ./configure
ends up with ...include(/ |$)
instead of the intended ...include([/ ]|$)
. To reproduce, I used BDB_CFLAGS="-I/usr/include -I/foo"
in the ./configure
environment and it was changed to -isystem /usr/include -isystem /foo
(wrong). This PR fixes that.
Subdirectories of /usr/include
should be with -isystem
since e.g. Qt may be installed in /usr/include/qt5
. Having -isystem /usr/include/whatever
is fine with gcc's #include_next
.
Thank you!
…ciently to preserve brackets 5a157eb Bugfix: configure: Only avoid -isystem for exact /usr/include path (Luke Dashjr) 556ee6f Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets (Luke Dashjr) Pull request description: The regex includes `[/ ]` which is supposed to match either a forward slash or a space, but m4 treats the brackets as special characters and effectively strips them out, leading to -isystem /usr/include paths except for in the typical scenario where it is the final parameter in the flag string. ACKs for top commit: hebasto: ACK 5a157eb, tested on Ubuntu 22.04 with clang 14.0. vasild: ACK 5a157eb Tree-SHA512: 5c8c282b647b7853b8fad1b5b473703c4a0635073d2685a8ac984151046e2c6a859e6972465419d27356dd29a47f21a2a3a6ad402ec434fe1f9882e5a35f0749
The regex includes
[/ ]
which is supposed to match either a forward slash or a space, but m4 treats the brackets as special characters and effectively strips them out, leading to -isystem /usr/include paths except for in the typical scenario where it is the final parameter in the flag string.