--- ./configure_orig	2025-01-15 04:04:45.989987368 -0500
+++ ./configure	2025-01-16 04:48:11.280560263 -0500
@@ -24409,7 +24391,7 @@
 
 # On Android and Cygwin the shared libraries must be linked with libpython.
 
-if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
+if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin" || test "$MACHDEP" = "aix"); then
   LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
 else
   LIBPYTHON=''
--- ./Modules/makesetup_orig	2025-01-17 10:35:19.269651982 -0500
+++ ./Modules/makesetup	2025-01-17 10:37:37.525775978 -0500
@@ -286,7 +286,7 @@
 				;;
 			esac
 			rule="$file: $objs"
-			rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
+			rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file \$(LINK_PYTHON_OBJS)"
 			echo "$rule" >>$rulesf
 		done
 	done
