Integrate changes #9244,9247,9250 from maintperl into mainline.
Jarkko Hietaniemi [Mon, 19 Mar 2001 21:31:28 +0000 (21:31 +0000)]
Dynaloading in 64-bit AIX with vac.

p4raw-link: @9250 on //depot/maint-5.6/perl: cbdca039b5e144d1778a3f526024bb6da2a58a72
p4raw-link: @9247 on //depot/maint-5.6/perl: 1d70f4d9891a32fb9ebe5b896f754b8c759ffece
p4raw-link: @9244 on //depot/maint-5.6/perl: f816f13eaa91bfe02a64ccda4a80eee889237c24

p4raw-id: //depot/perl@9251
p4raw-integrated: from //depot/maint-5.6/perl@9243 'copy in'
ext/DynaLoader/hints/aix.pl (@5902..) ext/DynaLoader/dl_aix.xs
(@9247..) 'merge in' hints/aix.sh (@8537..)

ext/DynaLoader/dl_aix.xs
ext/DynaLoader/hints/aix.pl
hints/aix.sh

index b2c92d8..1f51961 100644 (file)
 /* Older AIX C compilers cannot deal with C++ double-slash comments in
    the ibmcxx and/or xlC includes.  Since we only need a single file,
    be more fine-grained about what's included <hirschs@btv.ibm.com> */
+
 #ifdef USE_libC /* The define comes, when it comes, from hints/aix.pl. */
 #   define LOAD   loadAndInit
 #   define UNLOAD terminateAndUnload
-#   if defined(USE_xlC_load_h)
-#       include "/usr/lpp/xlC/include/load.h"
+#   if defined(USE_vacpp_load_h)
+#       include "/usr/vacpp/include/load.h"
 #   elif defined(USE_ibmcxx_load_h)
 #       include "/usr/ibmcxx/include/load.h"
+#   elif defined(USE_xlC_load_h)
+#       include "/usr/lpp/xlC/include/load.h"
+#   else
+#       include "/usr/include/load.h"
 #   endif
 #else
 #   define LOAD   load
index 7dde941..b1f8c7f 100644 (file)
@@ -2,7 +2,9 @@
 use Config;
 if ($Config{libs} =~ /-lC/ && -f '/lib/libC.a') {
     $self->{CCFLAGS} = $Config{ccflags} . ' -DUSE_libC';
-    if (-f '/usr/ibmcxx/include/load.h') {
+    if (-f '/usr/vacpp/include/load.h') {
+       $self->{CCFLAGS} .= ' -DUSE_vacpp_load_h';
+    } elsif (-f '/usr/ibmcxx/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_ibmcxx_load_h';
     } elsif (-f '/usr/lpp/xlC/include/load.h') {
        $self->{CCFLAGS} .= ' -DUSE_xlC_load_h';
index 31d189f..a55f244 100644 (file)
@@ -384,13 +384,13 @@ EOM
            ar="ar -X64"
            nm_opt="-X64 $nm_opt"
            # Note: Placing the 'qacflags' variable into the 'ldflags' string
-           # is NOT a typo.  ldqalags is passed to the C compiler for final
+           # is NOT a typo.  ldflags is passed to the C compiler for final
            # linking, and it wants -q64 (-b64 is for ld only!).
            case "$qacflags$qaldflags$qalibs" in
            '');;
            *) ccflags="$ccflags $qacflags"
               ldflags="$ldflags $qacflags"
-              lddqalags="$qaldflags $lddqalags"
+              lddlflags="$qaldflags $lddlflags"
               libswanted="$libswanted $qalibs"
               ;;
            esac