1
mirror of https://github.com/bitcoin/bitcoin synced 2024-07-21 23:34:19 +02:00

Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets

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.
This commit is contained in:
Luke Dashjr 2022-03-21 23:52:35 +00:00
parent 831675c8dc
commit 556ee6f2fa

View File

@ -1175,7 +1175,7 @@ dnl Do not change "-I/usr/include" to "-isystem /usr/include" because that
dnl is not necessary (/usr/include is already a system directory) and because
dnl it would break GCC's #include_next.
AC_DEFUN([SUPPRESS_WARNINGS],
[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include([/ ]|$);-I/usr/include\1;g')])
[[$(echo $1 |${SED} -E -e 's/(^| )-I/\1-isystem /g' -e 's;-isystem /usr/include([/ ]|$);-I/usr/include\1;g')]])
dnl enable-fuzz should disable all other targets
if test "x$enable_fuzz" = "xyes"; then