https://github.com/python/cpython/commit/5afb224564ab80ac4577c13a2387fb12ace835f4
commit: 5afb224564ab80ac4577c13a2387fb12ace835f4
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-05-10T15:54:05Z
summary:

[3.13] gh-117088: Fix AIX build (GH-132595) (GH-133839)

(cherry picked from commit 47f1722d8053fb4f79e68cba07cbf08fb58a511c)

Co-authored-by: Ayappan Perumal <[email protected]>

files:
A Misc/NEWS.d/next/Build/2025-04-16-09-38-48.gh-issue-117088.EFt_5c.rst
M Makefile.pre.in

diff --git a/Makefile.pre.in b/Makefile.pre.in
index eb7ea288adf3d5..70d549589ed3bc 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -910,7 +910,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
index 00000000000000..0845b0551394f8
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2025-04-16-09-38-48.gh-issue-117088.EFt_5c.rst
@@ -0,0 +1 @@
+AIX linker don't support -h option, so avoid it through platform check

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to