Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb84255

Browse files
committed
New version of Vladimir Marangozov's AIX hacks -- simpler etc.
1 parent b06df27 commit fb84255

7 files changed

Lines changed: 30 additions & 561 deletions

File tree

Misc/AIX-NOTES

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
Subject: AIX-NOTES FOR 1.4
2-
From: Manus Hand <[email protected]>
3-
4-
5-
Date: Fri, 25 Oct 1996 15:19:23 -0600 (MDT)
1+
Subject: AIX - Misc/AIX-NOTES
2+
From: Vladimir Marangozov <[email protected]>
3+
To: [email protected] (Guido van Rossum)
4+
Date: Wed, 6 Aug 1997 11:41:00 +0200 (EET)
65

76
==============================================================================
87
COMPILER INFORMATION
@@ -19,7 +18,6 @@ Date: Fri, 25 Oct 1996 15:19:23 -0600 (MDT)
1918
AIX C compiler version 3.1.2 on AIX 4.1.3 and AIX 4.1.4
2019
AIX C compiler version 1.3.0 on AIX 3.2.5
2120
If you have this problem, please report the compiler/OS version.
22-
[Postscript: it has also been spotted on AIX 4.2.1 --Guido]
2321

2422
(2) Stefan Esser ([email protected]), in work done to compile Python
2523
1.0.0 on AIX 3.2.4, reports that AIX compilers don't like the LANG
@@ -56,8 +54,7 @@ Date: Fri, 25 Oct 1996 15:19:23 -0600 (MDT)
5654
THREAD SUPPORT
5755
------------------------------------------------------------------------------
5856

59-
AIX uses pthreads. However, as of AIX version 4, there are two (incompatible)
60-
types of pthreads on AIX:
57+
As of AIX version 4, there are two (incompatible) types of pthreads on AIX:
6158
a) AIX DCE pthreads (on AIX 3.2.5)
6259
b) AIX 4 pthreads (on AIX 4.1 and up)
6360
Support has been added to Python to handle the distinction.
@@ -92,16 +89,15 @@ Hand ([email protected]) and Vladimir Marangozov ([email protected]).
9289

9390
Python modules may now be built as shared libraries on AIX using the normal
9491
process of uncommenting the "*shared*" line in Modules/Setup.in before the
95-
build. There is one additional step required, and that is to also uncomment
96-
the line in Modules/Setup.in which reads
97-
LINKCC= makexp_aix python.exp "" $(MYLIBS) $(ADDOBJS) ; $(CC)
92+
build.
9893

9994
AIX shared libraries require that an "export" and "import" file be provided
10095
at compile time to list all extern symbols which may be shared between
101-
modules. The effect of uncommenting the LINKCC line in Modules/Setup.in is
102-
to create the "export" file for the modules and the libraries that belong to
103-
the Python core. This is done by the "makexp_aix" script, which creates a
104-
file named python.exp before performing the link of the python binary.
96+
modules. The "export" file (named python.exp) for the modules and the
97+
libraries that belong to the Python core is created by the "makexp_aix"
98+
script before performing the link of the python binary. It lists all global
99+
symbols (exported during the link) of the modules and the libraries that
100+
make up the python executable.
105101

106102
When shared library modules (.so files) are made, a second shell script
107103
is invoked. This script is named "ld_so_aix" and is also provided with
@@ -111,16 +107,6 @@ it adds the appropriate arguments (in the appropriate order) to the link
111107
command that creates the shared module. Among other things, it specifies
112108
that the "python.exp" file is an "import" file for the shared module.
113109

114-
A default python.exp file is provided with the distribution. It will be
115-
overwritten (by the action of the makexp_aix script) if you build with shared
116-
libraries. The python.exp file which comes with the distribution contains
117-
all extern symbols of a completely statically built python executable.
118-
Any python.exp file which is created from a build of python with some of the
119-
modules linked as shared modules will obviously not list symbols from the now
120-
dynamic modules. The distributed python.exp is provided so that, with
121-
assistance from the ld_so_aix and makexp_aix scripts, shared extension
122-
modules may be added to an otherwise completely static python build.
123-
124110
At the time of this writing, neither the python.exp file nor the makexp_aix
125111
or ld_so_aix scripts are installed by the make procedure, so you should
126112
remember to keep these and/or copy them to a different location for

Modules/Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ INSTALL_SHARED= ${INSTALL} -m 555
7070

7171
# === Variables that are customizable by hand or by inclusion in Setup ===
7272

73-
LINKCC= $(PURIFY) $(CC)
73+
LINKCC= $(PURIFY) @LINKCC@
7474
INCLDIR= $(srcdir)/../Include
7575
CONFIGINCLDIR= ..
7676
CFLAGS= $(OPT) -I$(INCLDIR) -I$(CONFIGINCLDIR) $(DEFS)

Modules/Setup.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
# to ftp sources from elsewhere.
5252

5353

54-
# -------> Uncomment this line if you are running AIX <----------
55-
# -------> and if you are building with shared libraries <----------
56-
#LINKCC= makexp_aix python.exp "" $(MYLIBS) $(ADDOBJS) ; $(CC)
57-
58-
5954
# Some special rules to define PYTHONPATH.
6055
# Edit the definitions below to indicate which options you are using.
6156
# Don't add any whitespace or comments!

Modules/defmakexp_aix

Lines changed: 0 additions & 106 deletions
This file was deleted.

Modules/ld_so_aix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# (*) -bE:[ExportFile] -bE:[OutputBaseName].exp
2121
# (*) -bI:[ImportFile] -bI:./python.exp
2222
# -bM:[ModuleType] -bM:SRE
23+
# -bhalt:[Number] -bhalt:4
2324
# -T[Number] -T512
2425
# -H[Number] -H512
2526
# -lm
@@ -155,15 +156,15 @@ if test -z "$entry"; then
155156
entry=init`echo $filename | sed "s/module.*//"`
156157
fi
157158

158-
#echo "ld_so_aix: Debug info section
159+
#echo "ld_so_aix: Debug info section"
159160
#echo " -> output file : $objfile"
160161
#echo " -> import file : $impfile"
161162
#echo " -> export file : $expfile"
162163
#echo " -> entry point : $entry"
163164
#echo " -> object files: $objs"
164165
#echo " -> CC arguments: $args"
165166

166-
CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile"
167+
CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile -Wl,-bhalt:4"
167168
CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -o $objfile"
168169
CCARGS="$args"
169170

0 commit comments

Comments
 (0)