Skip to content

Commit

Permalink
Catch more g and w flags
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Sep 11, 2019
1 parent 616a97c commit fb50af8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
14 changes: 6 additions & 8 deletions src/modules/rlm_python/configure
Expand Up @@ -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
Expand Down Expand Up @@ -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;}
Expand Down
13 changes: 5 additions & 8 deletions src/modules/rlm_python/configure.ac
Expand Up @@ -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}\"])

Expand Down

0 comments on commit fb50af8

Please sign in to comment.