]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_python3: Fix build against Python 3.8.x (#3504)
authorJorge Pereira <jpereira@users.noreply.github.com>
Thu, 16 Jul 2020 22:59:33 +0000 (19:59 -0300)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2020 22:59:33 +0000 (15:59 -0700)
We don't need the compiler '-specs=/path/whatever.specs' that comes from Python

src/modules/rlm_python3/configure
src/modules/rlm_python3/configure.ac

index 05907f12c359b9b7408480716bd677392565e90c..363cdb31c26f18e19965833b1dfd5613dadbdec1 100755 (executable)
@@ -3173,7 +3173,8 @@ $as_echo "$as_me: ${PYTHON3_CONFIG_BIN}'s cflags were \"${python3_cflags}\"" >&6
                        s/-Wp,-D_FORTIFY_SOURCE=[[:digit:]]//g;\
                        s/-g[^ ]*//g;\
                        s/-W[^ ]*//g;\
-                       s/-DNDEBUG[[:blank:]]*//g;
+                       s/-DNDEBUG[[:blank:]]*//g;\
+                       s/-specs=[^ ]*//g
                        '`
                { $as_echo "$as_me:${as_lineno-$LINENO}: Sanitized cflags were \"${mod_cflags}\"" >&5
 $as_echo "$as_me: Sanitized cflags were \"${mod_cflags}\"" >&6;}
index 698a8c1d1874f0ebbf41925e6b7adbfa320b0f75..8f947d5349b770b120a80ff40ec856a7f7cc4dc0 100644 (file)
@@ -48,6 +48,7 @@ if test x$with_[]modname != xno; then
                dnl # Strip debug symbol flags (-g[0-9]?). We decide on debugging symbols, not python
                dnl # Strip -W*, we decide what warnings are important
                dnl # Strip -DNDEBUG
+               dnl # Strip -specs=/path/whatever.specs, We don't need the compiler .specs that comes from Python
                mod_cflags=`echo $python3_cflags | sed -e '\
                        s/-I/-isystem/g;\
                        s/-isysroot[[ =]]\{0,1\}[[^-]]*//g;\
@@ -55,7 +56,8 @@ if test x$with_[]modname != xno; then
                        s/-Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]//g;\
                        s/-g[[^ ]]*//g;\
                        s/-W[[^ ]]*//g;\
-                       s/-DNDEBUG[[[:blank:]]]*//g;
+                       s/-DNDEBUG[[[:blank:]]]*//g;\
+                       s/-specs=[^ ]*//g;
                        '`
                AC_MSG_NOTICE([Sanitized cflags were \"${mod_cflags}\"])