Earlier today HP released the OpenVMS v8.1 evaluation kit. This is the
second early adopter's kit of VMS on Itanium but the first one to
include native compilers. I'm pleased to say that with the attached
patch to bleadperl, Perl has already assimilated this new platform.

There were no code changes necessary and really just some minor
configuration tweaks. The only moderately interesting one was that we
can't use our home-grown signal() implementation by default, at least
not until I look more closely at why it doesn't work on Itanium.

I've tested the patch on Alpha to make sure it does no harm there. I
have no VAXen to test with but have tried to be careful about leaving
all existing support in place.


--- configure.com;-0    Sat Aug  2 01:01:20 2003
+++ configure.com       Thu Dec 18 15:23:06 2003
@@ -932,6 +932,7 @@
 $!     EOD
 $!     echo "     ","VMS_VAX"
 $!     echo "     ","VMS_AXP"
+$!     echo "     ","VMS_IA64"
 $!        : Now look for a hint file osname_osvers, unless one has been
 $!        : specified already.
 $!     TYPE SYS$INPUT:
@@ -1105,17 +1106,24 @@
 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
 $! configure a VAX build on an Alpha).
 $!
-$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
+$ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
 $ THEN 
 $   archname = "VMS_VAX"
-$   otherarch = "an Alpha"
+$   otherarch = "an Alpha or IA64"
 $   alignbytes="8"
 $   arch_type = "ARCH-TYPE=__VAX__"
 $ ELSE
-$   archname = "VMS_AXP"
-$   otherarch = "a VAX"
+$   IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
+$   THEN
+$       archname = "VMS_AXP"
+$       otherarch = "a VAX or IA64"
+$       arch_type = "ARCH-TYPE=__AXP__"
+$   ELSE
+$       archname = "VMS_IA64"
+$       otherarch = "a VAX or Alpha"
+$       arch_type = "ARCH-TYPE=__IA64__"
+$   ENDIF
 $   alignbytes="8"
-$   arch_type = "ARCH-TYPE=__AXP__"
 $ ENDIF
 $ dflt = archname
 $ rp = "What is your architecture name? [''archname'] "
@@ -1142,6 +1150,10 @@
 $   THEN
 $     macros = macros + """AXE=1"","
 $   ENDIF
+$   IF (archname.EQS."VMS_IA64")
+$   THEN
+$     macros = macros + """IXE=1"","
+$   ENDIF
 $ ENDIF
 $!
 $!: is AFS running?                       !sfn
@@ -1581,7 +1593,8 @@
 $     vms_cc_available = vms_cc_available + "cc/decc "
 $   ENDIF
 $ ELSE
-$   IF 
(F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
+$   IF 
(F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
 -
+    .or.(F$LOCATE("hp",line).NE.F$LENGTH(line))
 $   THEN 
 $     vms_cc_dflt = "/decc"
 $     vms_cc_available = vms_cc_available + "cc/decc "
@@ -1715,7 +1728,8 @@
 $ THEN
 $   ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
 $   Mcc = ans
-$   IF 
(F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
+$   IF 
(F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
+    .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
 $   THEN
 $     Mcc = "cc/decc"
 $! CPQ ?
@@ -2002,7 +2016,12 @@
 $   read CONFIG line
 $   archsufx = "VAX"
 $ ELSE
-$   archsufx = "AXP"
+$   IF archname .EQS. "VMS_AXP"
+$   THEN
+$       archsufx = "AXP"
+$   ELSE
+$       archsufx = "IA64"
+$   ENDIF
 $ ENDIF
 $ CLOSE CONFIG
 $ line = F$EDIT(line,"TRIM,COMPRESS")
@@ -2249,7 +2268,7 @@
 $ ENDIF
 $!
 $! Ask if they want to build with 64-bit support
-$ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, 
f$getsyi(""version""))'".ges."7.1")
+$ IF (archname.NES."VMS_VAX").and.("''f$extract(1,3, 
f$getsyi(""version""))'".ges."7.1")
 $ THEN
 $   bool_dflt = "n"
 $   IF F$TYPE(use64bitint) .NES. "" 
@@ -2354,8 +2373,8 @@
 $     ELSE
 $       use_5005_threads="Y"
 $     ENDIF
-$     ! Are they on VMS 7.1 on an alpha?
-$     if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, 
f$getsyi(""version""))'".ges."7.1")
+$     ! Are they on VMS 7.1 on an alpha or itanium?
+$     if (archname.nes."VMS_VAX").and.("''f$extract(1,3, 
f$getsyi(""version""))'".ges."7.1")
 $     THEN
 $       echo ""
 $       echo "Threaded perl can be linked to use multiple kernel threads"
@@ -2376,7 +2395,7 @@
 $     ENDIF
 $   ENDIF
 $ ENDIF
-$ IF archname .EQS. "VMS_AXP"
+$ IF archname .NES. "VMS_VAX"
 $ THEN
 $! Case sensitive?
 $   echo ""
@@ -2940,11 +2959,20 @@
 $   exe_ext=".axe"
 $   lib_ext=".alb"
 $ ELSE
-$   obj_ext=".obj"
-$   so="exe"
-$   dlext="exe"
-$   exe_ext=".exe"
-$   lib_ext=".olb"
+$   IF (sharedperl .AND. archname .EQS. "VMS_IA64")
+$   THEN
+$     obj_ext=".ibj"
+$     so="ixe"
+$     dlext="ixe"
+$     exe_ext=".ixe"
+$     lib_ext=".ilb"
+$   ELSE
+$     obj_ext=".obj"
+$     so="exe"
+$     dlext="exe"
+$     exe_ext=".exe"
+$     lib_ext=".olb"
+$   ENDIF
 $ ENDIF
 $ dlobj="dl_vms''obj_ext'"
 $!
@@ -5081,7 +5109,13 @@
 $   WS "    printf(""%d\n"",iss);"
 $   WS "}"
 $   CS
-$   GOSUB compile
+$   IF (archname .EQS. "VMS_AXP")
+$   THEN
+$     GOSUB compile
+$   ELSE
+$     ! Causes SS$_BADSTACK on OpenVMS I64 v8.1 (but hey, it was undocumented)
+$     tmp = "0"        
+$   ENDIF
 $   IF tmp .EQS. "1"
 $   THEN
 $       echo4 "Yep, we can."
@@ -6367,6 +6401,7 @@
 $   OPEN/WRITE CONFIG 'file_2_find'
 $   ext = ".exe"
 $   IF (sharedperl .AND. archname .EQS. "VMS_AXP") THEN ext := .AXE
+$   IF (sharedperl .AND. archname .EQS. "VMS_IA64") THEN ext := .IXE
 $   IF (use_vmsdebug_perl)
 $   THEN
 $     WRITE CONFIG "define verb dbgperl"
--- vms/gen_shrfls.pl;-0        Fri Jul 19 17:50:14 2002
+++ vms/gen_shrfls.pl   Thu Dec 18 15:22:54 2003
@@ -39,7 +39,7 @@
 
 $debug = $ENV{'GEN_SHRFLS_DEBUG'};
 
-print "gen_shrfls.pl Rev. 18-May-2001\n" if $debug;
+print "gen_shrfls.pl Rev. 18-Dec-2003\n" if $debug;
 
 if ($ARGV[0] eq '-f') {
   open(INP,$ARGV[1]) or die "Can't read input file $ARGV[1]: $!\n";
@@ -56,7 +56,8 @@
 $cc_cmd = shift @ARGV;
 
 # Someday, we'll have $GetSyI built into perl . . .
-$isvax = `\$ Write Sys\$Output F\$GetSyI(\"HW_MODEL\")` <= 1024;
+$isvax = `\$ Write Sys\$Output \(F\$GetSyI(\"HW_MODEL\") .LE. 1024 .AND. 
F\$GetSyI(\"HW_MODEL\") .GT. 0\)`;
+chomp $isvax;
 print "\$isvax: \\$isvax\\\n" if $debug;
 
 print "Input \$cc_cmd: \\$cc_cmd\\\n" if $debug;

Reply via email to