]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-117088: Fix AIX build (GH-132595) (GH-133838)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 10 May 2025 15:55:47 +0000 (17:55 +0200)
committerGitHub <noreply@github.com>
Sat, 10 May 2025 15:55:47 +0000 (15:55 +0000)
(cherry picked from commit 47f1722d8053fb4f79e68cba07cbf08fb58a511c)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
Makefile.pre.in
Misc/NEWS.d/next/Build/2025-04-16-09-38-48.gh-issue-117088.EFt_5c.rst [new file with mode: 0644]

index 17e0c9904cc3aa2d000b588ef8ef66b428b6e6bb..fd3d0274bca7d727bef8083d46d4d12aaa2cc954 100644 (file)
@@ -1012,7 +1012,12 @@ $(LIBRARY): $(LIBRARY_OBJS)
        $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
 
 libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
-       $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
+       # AIX Linker don't support "-h" option
+       if test "$(MACHDEP)" != "aix"; then \
+               $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
+       else \
+               $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
+       fi
        if test $(INSTSONAME) != $@; then \
                $(LN) -f $(INSTSONAME) $@; \
        fi
diff --git a/Misc/NEWS.d/next/Build/2025-04-16-09-38-48.gh-issue-117088.EFt_5c.rst b/Misc/NEWS.d/next/Build/2025-04-16-09-38-48.gh-issue-117088.EFt_5c.rst
new file mode 100644 (file)
index 0000000..0845b05
--- /dev/null
@@ -0,0 +1 @@
+AIX linker don't support -h option, so avoid it through platform check