From fb50af8a7594dd0c50ef635e9ee54dffec623cef Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Wed, 11 Sep 2019 14:35:28 -0500 Subject: [PATCH] Catch more g and w flags --- src/modules/rlm_python/configure | 14 ++++++-------- src/modules/rlm_python/configure.ac | 13 +++++-------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/modules/rlm_python/configure b/src/modules/rlm_python/configure index f13922ebe1ac..4c22b3557004 100755 --- a/src/modules/rlm_python/configure +++ b/src/modules/rlm_python/configure @@ -1255,7 +1255,7 @@ if test -n "$ac_init_help"; then Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-rlm-python-config-bin=PATH Path to python binary + --with-rlm-python-config-bin=PATH Path to python-config binary Some influential environment variables: CC C compiler command @@ -2778,16 +2778,14 @@ 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 '\ + mod_cflags=`echo $python_cflags | sed -e '\ s/-I/-isystem/g;\ s/-isysroot[ =]\{0,1\}[^-]*//g;\ - s/-O[[:digit:]][[:blank:]]*//g;\ + s/-O[^[[:blank:]]]*//g;\ s/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]//g;\ - s/-g[[:digit:]][[:space:]]*//g;\ - s/-g[[:space:]]*//g;\ - s/-Werror\([ =]\{0,1\}[^ ]*\)\{0,1\}//g;\ - s/-Wall[[:space:]]//g;\ - s/-DNDEBUG[[:blank:]]*//g + s/-g[^ ]*//g;\ + s/-W[^ ]*//g;\ + s/-DNDEBUG[[: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 07e6182fb338..e1e2ade410ac 100644 --- a/src/modules/rlm_python/configure.ac +++ b/src/modules/rlm_python/configure.ac @@ -40,19 +40,16 @@ if test x$with_[]modname != xno; then dnl # Strip optimisation flags (-O[0-9]?). We decide our optimisation level, not python. dnl # -D_FORTIFY_SOURCE needs -O. dnl # Strip debug symbol flags (-g[0-9]?). We decide on debugging symbols, not python - dnl # Strip -Werror - dnl # Strip -Wall, we decide what warnings are important + dnl # Strip -W*, we decide what warnings are important dnl # Strip -DNDEBUG mod_cflags=`echo $python_cflags | sed -e '\ s/-I/-isystem/g;\ s/-isysroot[[ =]]\{0,1\}[[^-]]*//g;\ - s/-O[[[:digit:]]][[[:blank:]]]*//g;\ + s/-O[[^[[:blank:]]]]*//g;\ s/-Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]//g;\ - s/-g[[[:digit:]]][[[:space:]]]*//g;\ - s/-g[[[:space:]]]*//g;\ - s/-Werror\([[ =]]\{0,1\}[[^ ]]*\)\{0,1\}//g;\ - s/-Wall[[[:space:]]]//g;\ - s/-DNDEBUG[[[:blank:]]]*//g + s/-g[[^ ]]*//g;\ + s/-W[[^ ]]*//g;\ + s/-DNDEBUG[[[:blank:]]]*//g; '` AC_MSG_NOTICE([Sanitized cflags were \"${mod_cflags}\"])