summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-06-29 13:44:14 (GMT)
committerGitHub <noreply@github.com>2022-06-29 13:44:14 (GMT)
commit6485c3c7267eeb4095530af474c43f1244cb492b (patch)
tree2dd3e4b008e4fd8f95e3237dee78cec85492c823 /Modules
parent655b3aa4c8889a46e44b449cec16c85704a5e274 (diff)
downloadcpython-6485c3c7267eeb4095530af474c43f1244cb492b.zip
cpython-6485c3c7267eeb4095530af474c43f1244cb492b.tar.gz
cpython-6485c3c7267eeb4095530af474c43f1244cb492b.tar.bz2
gh-94404: Use module CFLAGS before PY_STDMODULE_CFLAGS (GH-94413)
``PY_STDMODULE_CFLAGS`` may contain include directories with system headers. This can break compiling with built-in libmpdec.
Diffstat (limited to 'Modules')
-rwxr-xr-xModules/makesetup7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/makesetup b/Modules/makesetup
index a45b7de..0830381 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -260,13 +260,14 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
\$*) ;;
*) src='$(srcdir)/'"$srcdir/$src";;
esac
+ # custom flags first, PY_STDMODULE_CFLAGS may contain -I with system libmpdec
case $doconfig in
- no) cc="$cc \$(PY_STDMODULE_CFLAGS) \$(CCSHARED)";;
+ no) cc="$cc $cpps \$(PY_STDMODULE_CFLAGS) \$(CCSHARED)";;
*)
- cc="$cc \$(PY_BUILTIN_MODULE_CFLAGS)";;
+ cc="$cc $cpps \$(PY_BUILTIN_MODULE_CFLAGS)";;
esac
# force rebuild when header file or module build flavor (static/shared) is changed
- rule="$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(PYTHON_HEADERS) Modules/config.c; $cc $cpps -c $src -o $obj"
+ rule="$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(PYTHON_HEADERS) Modules/config.c; $cc -c $src -o $obj"
echo "$rule" >>$rulesf
done
case $doconfig in