[Python-checkins] gh-96269: Fix build dependency on AIX (GH-96304)

tiran webhook-mailer at python.org
Fri Aug 26 06:32:24 EDT 2022


https://github.com/python/cpython/commit/8c1dbad36f44f332dadd9d08c8ffe3da7f6a20a6
commit: 8c1dbad36f44f332dadd9d08c8ffe3da7f6a20a6
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022-08-26T12:31:58+02:00
summary:

gh-96269: Fix build dependency on AIX (GH-96304)

files:
A Misc/NEWS.d/next/Build/2022-08-26-11-50-03.gh-issue-96269.x_J5h0.rst
M Makefile.pre.in
M Modules/makesetup

diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3491e91f43ab..af203705d38e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2522,6 +2522,8 @@ Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
 ##########################################################################
 # Module dependencies and platform-specific files
 
+MODULE_DEPS=$(PYTHON_HEADERS) Modules/config.c $(EXPORTSYMS)
+
 MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h
 MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h
 MODULE_PYEXPAT_DEPS=$(LIBEXPAT_HEADERS) @LIBEXPAT_INTERNAL@
diff --git a/Misc/NEWS.d/next/Build/2022-08-26-11-50-03.gh-issue-96269.x_J5h0.rst b/Misc/NEWS.d/next/Build/2022-08-26-11-50-03.gh-issue-96269.x_J5h0.rst
new file mode 100644
index 000000000000..adb605fede5d
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-08-26-11-50-03.gh-issue-96269.x_J5h0.rst
@@ -0,0 +1,3 @@
+Shared module targets now depend on new ``MODULE_DEPS`` variable, which
+includes ``EXPORTSYMS``. This fixes a build order issue on unsupported AIX
+platform.
diff --git a/Modules/makesetup b/Modules/makesetup
index 08303814c8c9..5c275ac9a049 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -267,7 +267,7 @@ sed -e 's/[ 	]*#.*//' -e '/^[ 	]*$/d' |
 				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 -c $src -o $obj"
+			rule="$obj: $src \$(MODULE_${mods_upper}_DEPS) \$(MODULE_DEPS); $cc -c $src -o $obj"
 			echo "$rule" >>$rulesf
 		done
 		case $doconfig in



More information about the Python-checkins mailing list