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

(cherry picked from commit 47f1722d80)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
This commit is contained in:
Miss Islington (bot) 2025-05-10 17:54:05 +02:00 committed by GitHub
parent aa0c3d1098
commit 5afb224564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -0,0 +1 @@
AIX linker don't support -h option, so avoid it through platform check