summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-10 19:44:44 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-10 19:44:44 (GMT)
commit8e6b407d6fdca02f84409790a4c1f92478ac8dc1 (patch)
tree8eacdf08153b0656255fc9eb691a62698f485057 /Modules
parentdfa9b294fac33934547b5f7b7542466c469e6599 (diff)
downloadcpython-8e6b407d6fdca02f84409790a4c1f92478ac8dc1.zip
cpython-8e6b407d6fdca02f84409790a4c1f92478ac8dc1.tar.gz
cpython-8e6b407d6fdca02f84409790a4c1f92478ac8dc1.tar.bz2
Issue #941346: Improve the build process under AIX and allow Python to
be built as a shared library. Patch by Sébastien Sablé.
Diffstat (limited to 'Modules')
-rw-r--r--[-rwxr-xr-x]Modules/ld_so_aix.in (renamed from Modules/ld_so_aix)18
1 files changed, 11 insertions, 7 deletions
diff --git a/Modules/ld_so_aix b/Modules/ld_so_aix.in
index 6b83823..0fd245b 100755..100644
--- a/Modules/ld_so_aix
+++ b/Modules/ld_so_aix.in
@@ -131,11 +131,14 @@ do
shift
done
+if test "$objfile" = "libpython@VERSION@.so"; then
+ ldsocoremode="true"
+fi
if test -z "$objs"; then
echo "ld_so_aix: No input files; exiting."
exit 2
-elif test ! -r "$impfile"; then
+elif test ! -r "$impfile" -a -z "$ldsocoremode"; then
echo "ld_so_aix: Import file '$impfile' not found or not readable; exiting."
exit 2
fi
@@ -155,7 +158,7 @@ fi
# Default entry symbol for Python modules = init[modulename]
# Can be overriden by providing a -e argument.
if test -z "$entry"; then
- entry=init`echo $filename | sed "s/module.*//"`
+ entry=PyInit_`echo $filename | sed "s/module.*//"`
fi
#echo "ld_so_aix: Debug info section"
@@ -166,11 +169,12 @@ fi
#echo " -> object files: $objs"
#echo " -> CC arguments: $args"
-CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile -Wl,-bhalt:4"
-CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -o $objfile"
-# Note: to use dynamic libraries like libtcl8.4.so and libtk8.4.so
-# you may need to replace the second CCOPT line above with the following:
-# CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -brtl -bnortllib -lm -o $objfile"
+if test -z "$ldsocoremode"; then
+ CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile -Wl,-bhalt:4"
+else
+ CCOPT="-Wl,-bnoentry -Wl,-bE:$expfile -Wl,-bhalt:4"
+fi
+CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -Wl,-brtl -Wl,-bnortllib -lm -o $objfile"
CCARGS="$args"