diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-10 19:55:19 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-10 19:55:19 (GMT) |
commit | 80f45a09985d8396209045db236eabb0f8f3bce4 (patch) | |
tree | cda1005d65a9038253e98a920c043451471c012c /Modules | |
parent | 84c809be5ac34a7a7bf89285e42c9fb6b5f05065 (diff) | |
download | cpython-80f45a09985d8396209045db236eabb0f8f3bce4.zip cpython-80f45a09985d8396209045db236eabb0f8f3bce4.tar.gz cpython-80f45a09985d8396209045db236eabb0f8f3bce4.tar.bz2 |
Merged revisions 84680 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84680 | antoine.pitrou | 2010-09-10 21:44:44 +0200 (ven., 10 sept. 2010) | 4 lines
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" |