Skip to content

Commit 5afb224

Browse files
[3.13] gh-117088: Fix AIX build (GH-132595) (GH-133839)
(cherry picked from commit 47f1722) Co-authored-by: Ayappan Perumal <[email protected]>
1 parent aa0c3d1 commit 5afb224

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile.pre.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,12 @@ $(LIBRARY): $(LIBRARY_OBJS)
910910
$(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
911911

912912
libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
913-
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM)
913+
# AIX Linker don't support "-h" option
914+
if test "$(MACHDEP)" != "aix"; then \
915+
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
916+
else \
917+
$(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
918+
fi
914919
if test $(INSTSONAME) != $@; then \
915920
$(LN) -f $(INSTSONAME) $@; \
916921
fi
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AIX linker don't support -h option, so avoid it through platform check

0 commit comments

Comments
 (0)