diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:23:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-13 02:23:16 +0000 |
commit | 61d42ce43847d6cea183d4f40e2921e53606f13f (patch) | |
tree | 98a862f5466c34e760371d4530634e628ebe4f2c /hints | |
parent | ce8217e0ee91404d9ead31e9161c90ae176fd05b (diff) | |
download | perl-61d42ce43847d6cea183d4f40e2921e53606f13f.tar.gz |
New AIX dynaloading code from Jens-Uwe Mager.
Does break binary compatibility.
p4raw-id: //depot/perl@10554
Diffstat (limited to 'hints')
-rw-r--r-- | hints/aix.sh | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/hints/aix.sh b/hints/aix.sh index 00fbb47ce5..5698036aee 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -55,9 +55,11 @@ esac case "$osvers" in 3.*|4.1.*|4.2.*) usenm='undef' + usenativedlopen='false' ;; *) usenm='true' + usenativedlopen='true' ;; esac @@ -444,20 +446,26 @@ $define|true|[yY]*) esac EOCBU -# If the C++ libraries, libC and libC_r, are available we will prefer them -# over the vanilla libc, because the libC contain loadAndInit() and -# terminateAndUnload() which work correctly with C++ statics while libc -# load() and unload() do not. See ext/DynaLoader/dl_aix.xs. -# The C-to-C_r switch is done by usethreads.cbu, if needed. -if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then - # Cify libswanted. - set `echo X "$libswanted "| sed -e 's/ c / C c /'` - shift - libswanted="$*" - # Cify lddlflags. - set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` - shift - lddlflags="$*" +if test $usenativedlopen = 'true' +then + ccflags="$ccflags -DUSE_NATIVE_DLOPEN" + ldflags="$ldflags -brtl" +else + # If the C++ libraries, libC and libC_r, are available we will prefer them + # over the vanilla libc, because the libC contain loadAndInit() and + # terminateAndUnload() which work correctly with C++ statics while libc + # load() and unload() do not. See ext/DynaLoader/dl_aix.xs. + # The C-to-C_r switch is done by usethreads.cbu, if needed. + if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then + # Cify libswanted. + set `echo X "$libswanted "| sed -e 's/ c / C c /'` + shift + libswanted="$*" + # Cify lddlflags. + set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` + shift + lddlflags="$*" + fi fi # EOF |