From: Matthew Newton Date: Thu, 22 Oct 2020 09:27:43 +0000 (+0100) Subject: rlm_python: Anchor with a space so we don't mangle the middle of flags X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a170f36a43ebf9ee306529fbacf91dde2bad9b0;p=thirdparty%2Ffreeradius-server.git rlm_python: Anchor with a space so we don't mangle the middle of flags See #3693 --- diff --git a/src/modules/rlm_python/configure b/src/modules/rlm_python/configure index c4a9134fa8f..736a197439d 100755 --- a/src/modules/rlm_python/configure +++ b/src/modules/rlm_python/configure @@ -2780,15 +2780,16 @@ test -n "$PYTHON_CONFIG_BIN" || PYTHON_CONFIG_BIN="not-found" { $as_echo "$as_me:${as_lineno-$LINENO}: ${PYTHON_CONFIG_BIN}'s cflags were \"${python_cflags}\"" >&5 $as_echo "$as_me: ${PYTHON_CONFIG_BIN}'s cflags were \"${python_cflags}\"" >&6;} - mod_cflags=`echo $python_cflags | sed -e '\ - s/-I/-isystem/g;\ - s/-isysroot[ =]\{0,1\}[^-]*//g;\ - s/-O[^[[:blank:]]]*//g;\ - s/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]//g;\ - s/-g[^ ]*//g;\ - s/-W[^ ]*//g;\ - s/-DNDEBUG[[:blank:]]*//g;\ - s/-fstack-clash-protection[[:blank:]]*//g; + mod_cflags=`echo " $python_cflags" | sed -e '\ + s/ -I/ -isystem/g;\ + s/ -isysroot[ =]\{0,1\}[^-]*//g;\ + s/ -O[^[[:blank:]]]*//g;\ + s/ -Wp,-D_FORTIFY_SOURCE=[[:digit:]]//g;\ + s/ -g[^ ]*//g;\ + s/ -W[^ ]*//g;\ + s/ -DNDEBUG[[:blank:]]*//g;\ + s/ -frecord-gcc-switches//g;\ + s/ -fstack-clash-protection[[:blank:]]*//g; '` { $as_echo "$as_me:${as_lineno-$LINENO}: Sanitized cflags were \"${mod_cflags}\"" >&5 $as_echo "$as_me: Sanitized cflags were \"${mod_cflags}\"" >&6;} diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac index 8607421a8ad..8b4d16a6bdb 100644 --- a/src/modules/rlm_python/configure.ac +++ b/src/modules/rlm_python/configure.ac @@ -49,15 +49,16 @@ if test x$with_[]modname != xno; then dnl # Strip -DNDEBUG dnl # Strip -stack-clash-protection. We don't need it for our module and it's not dnl # supported by clang < 11. - mod_cflags=`echo $python_cflags | sed -e '\ - s/-I/-isystem/g;\ - s/-isysroot[[ =]]\{0,1\}[[^-]]*//g;\ - s/-O[[^[[:blank:]]]]*//g;\ - s/-Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]//g;\ - s/-g[[^ ]]*//g;\ - s/-W[[^ ]]*//g;\ - s/-DNDEBUG[[[:blank:]]]*//g;\ - s/-fstack-clash-protection[[[:blank:]]]*//g; + mod_cflags=`echo " $python_cflags" | sed -e '\ + s/ -I/ -isystem/g;\ + s/ -isysroot[[ =]]\{0,1\}[[^-]]*//g;\ + s/ -O[[^[[:blank:]]]]*//g;\ + s/ -Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]//g;\ + s/ -g[[^ ]]*//g;\ + s/ -W[[^ ]]*//g;\ + s/ -DNDEBUG[[[:blank:]]]*//g;\ + s/ -frecord-gcc-switches//g;\ + s/ -fstack-clash-protection[[[:blank:]]]*//g; '` AC_MSG_NOTICE([Sanitized cflags were \"${mod_cflags}\"])