Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# added for local development
.buildaix/
Modules/python.exp
buildaix/
installp/
.gitignore
Expand Down
5 changes: 0 additions & 5 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,6 @@ def _generate_posix_vars():
if hasattr(e, "strerror"):
msg = msg + " (%s)" % e.strerror
raise OSError(msg)
# On AIX, there are wrong paths to the linker scripts in the Makefile
# -- these paths are relative to the Python source, but when installed
# the scripts are in another directory.
if _PYTHON_BUILD:
vars['BLDSHARED'] = vars['LDSHARED']

# There's a chicken-and-egg situation on OS X with regards to the
# _sysconfigdata module after the changes introduced by #15298:
Expand Down
18 changes: 1 addition & 17 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1578,21 +1578,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
$(INSTALL_DATA) Modules/python.exp \
$(DESTDIR)$(LIBPL)/python.exp; \
echo; echo "$(LIBPL)/python.exp"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
$(DESTDIR)$(LIBPL)/makexp_aix; \
echo "$(LIBPL)/makexp_aix"; \
$(INSTALL_SCRIPT) Modules/ld_so_aix \
$(DESTDIR)$(LIBPL)/ld_so_aix; \
echo "$(LIBPL)/ld_so_aix"; \
echo; echo "See Misc/AIX-NOTES for details."; \
else true; \
fi

# Install the dynamically loadable modules
# This goes into $(exec_prefix)
Expand Down Expand Up @@ -1787,8 +1772,7 @@ distclean: clobber
if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \
done
-rm -f core Makefile Makefile.pre config.status Modules/Setup.local \
Modules/ld_so_aix Modules/python.exp Misc/python.pc \
Misc/python-embed.pc Misc/python-config.sh
Misc/python.pc Misc/python-embed.pc Misc/python-config.sh
-rm -f python*-gdb.py
# Issue #28258: set LC_ALL to avoid issues with Estonian locale.
# Expansion is performed here by shell (spawned by make) itself before
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Simplify linking of shared libraries on the AIX to be similar to that of a
System V system. Patch by Eric N. Vander Weele.
38 changes: 7 additions & 31 deletions Misc/README.AIX
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ There are various aliases for the native compiler. The recommended
alias for compiling Python is 'xlc_r', which provides a better level of
compatibility and handles thread initialization properly.

It is a good idea to add the '-qmaxmem=70000' option, otherwise the
compiler considers various files too complex to optimize.
It is a good idea to add the '-qmaxmem=-1' option, otherwise the
compiler is limited by the amount of memory allocated for performing
specific, memory-intensive optimizations. The value '-1' permits as
much memory as needed (i.e., not limited). If you find that
compilation fails due to exceeding available system resources,
previous recommendations of '70000' have been advised.

Compiling with xlc:

cd Python-3.2
CC=xlc_r OPT="-O2 -qmaxmem=70000" ./configure --without-computed-gotos --enable-shared
CC=xlc_r OPT="-O2 -qmaxmem=-1" ./configure --without-computed-gotos --enable-shared
make

Note:
Expand Down Expand Up @@ -100,31 +104,3 @@ Those issues are currently affecting Python on AIX:
* issue 9920: minor arithmetic issues in cmath

* issue 11215: test_fileio fails



======================================================================
Implementation details for developers
----------------------------------------------------------------------

Python and python modules can now be built as shared libraries on AIX
as usual.

AIX shared libraries require that an "export" and "import" file be
provided at compile time to list all extern symbols which may be
shared between modules. The "export" file (named python.exp) for the
modules and the libraries that belong to the Python core is created by
the "makexp_aix" script before performing the link of the python
binary. It lists all global symbols (exported during the link) of the
modules and the libraries that make up the python executable.

When shared library modules (.so files) are made, a second shell
script is invoked. This script is named "ld_so_aix" and is also
provided with the distribution in the Modules subdirectory. This
script acts as an "ld" wrapper which hides the explicit management of
"export" and "import" files; it adds the appropriate arguments (in the
appropriate order) to the link command that creates the shared module.
Among other things, it specifies that the "python.exp" file is an
"import" file for the shared module.

This mechanism should be transparent.
195 changes: 0 additions & 195 deletions Modules/ld_so_aix.in

This file was deleted.

81 changes: 0 additions & 81 deletions Modules/makexp_aix

This file was deleted.

Loading