From 556ee6f2fa0e2da2bb12fe05a885431f61db2e47 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 21 Mar 2022 23:52:35 +0000 Subject: 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. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9a16b7c880..db283347cd 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- cgit v1.2.3 From 5a157eb3703e1e65ed285f13a824562ab12aa3ff Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 22 Mar 2022 14:13:13 +0000 Subject: Bugfix: configure: Only avoid -isystem for exact /usr/include path --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index db283347cd..430ed75e07 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- cgit v1.2.3