diff options
author | Eric Bartley <bartley@icd.cc.purdue.edu> | 1997-04-26 20:31:37 -0500 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-05-01 00:00:00 +1200 |
commit | 019c9bb5516c92cceeeb4b050fa8075a1359c43c (patch) | |
tree | da51d2c69987eb98b20a5645f8948b3824cfb255 | |
parent | 3e07908ea1eeba49c73de370640833193accfd6e (diff) | |
download | perl-019c9bb5516c92cceeeb4b050fa8075a1359c43c.tar.gz |
Support shared libperl on AIX
The current distribution will not build a shared libperl on AIX.
Currently the Makefile generated uses the same ld options for building
a shared libperl and dynamicly loaded extentions. AIX's compiler
requires that you tell it explicitly what symbols to export/import. So,
it needs a separate set of LD options for each.
On top of all this, AIX doesn't seem to have an equivilent to
LD_LIBRARY_PATH. So, the directories to search during runtime must be
explicitly compiled in. In the following patch I compiled in both the
compilation directory (for miniperl and testing) and the installation
directory. I wish someone could suggest something cleaner, but it works.
p5p-msgid: 199704270131.UAA51426@icd.cc.purdue.edu
-rwxr-xr-x | Configure | 3 | ||||
-rwxr-xr-x | Makefile.SH | 19 | ||||
-rw-r--r-- | hints/aix.sh | 3 |
3 files changed, 24 insertions, 1 deletions
@@ -4726,6 +4726,9 @@ xxx='' tmp_shrpenv='' if "$useshrplib"; then case "$osname" in + aix) + # We'll set it in Makefile.SH... + ;; solaris|netbsd) xxx="-R $shrpdir" ;; diff --git a/Makefile.SH b/Makefile.SH index db4e759da8..16b523dce0 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -24,6 +24,7 @@ case "$d_dosuid" in esac linklibperl='$(LIBPERL)' +shrpldflags='$(LDDLFLAGS)' case "$useshrplib" in true) pldlflags="$cccdlflags" @@ -37,6 +38,11 @@ true) sunos*|freebsd[23]*|netbsd*) linklibperl="-lperl" ;; + aix*) + shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp -b noentry -lc -lm -lbsd" + aixinstdir=`pwd | sed 's/\/UU$//'` + linklibperl="-L $archlibexp/CORE -L $aixinstdir -lperl" + ;; esac ;; *) pldlflags='' @@ -98,6 +104,7 @@ man3ext = $man3ext # The following are used to build and install shared libraries for # dynamic loading. LDDLFLAGS = $lddlflags +SHRPLDFLAGS = $shrpldflags CCDLFLAGS = $ccdlflags DLSUFFIX = .$dlext PLDLFLAGS = $pldlflags @@ -248,8 +255,18 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj) case "$useshrplib" in true) $spitshell >>Makefile <<'!NO!SUBS!' - $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) + $(LD) $(SHRPLDFLAGS) -o $@ perl$(OBJ_EXT) $(obj) +!NO!SUBS! + case "$osname" in + aix) + $spitshell >>Makefile <<'!NO!SUBS!' + mv $@ libperl$(OBJ_EXT) + $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) !NO!SUBS! + ;; + *) + ;; + esac ;; *) $spitshell >>Makefile <<'!NO!SUBS!' diff --git a/hints/aix.sh b/hints/aix.sh index 6a9e54570a..2c42151ea6 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -17,6 +17,9 @@ alignbytes=8 usemymalloc='n' +so="a" +dlext="so" + # Make setsockopt work correctly. See man page. # ccflags='-D_BSD=44' |