From: Jarkko Hietaniemi Date: Thu, 29 Aug 2002 22:22:51 +0000 (+0300) Subject: OS/400 PASE port X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=522b859adcc800ddbbe593fba580633bb305644f;p=p5sagit%2Fp5-mst-13.2.git OS/400 PASE port Message-ID: <20020829192251.GA27102@lyta.hut.fi> p4raw-id: //depot/perl@17827 --- diff --git a/Configure b/Configure index e65ab41..d57d749 100755 --- a/Configure +++ b/Configure @@ -5418,7 +5418,7 @@ case "$usenm" in esac case "$dflt" in '') - if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then + if $test "$osname" = aix -a "X$PASE" != "$Xdefine" -a ! -f /lib/syscalls.exp; then echo " " echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4 echo "'nm' won't be sufficient on this sytem." >&4 @@ -5765,11 +5765,19 @@ else fi fi nm_extract="$com" -if $test -f /lib/syscalls.exp; then +case "$PASE" in +define) + echo " " + echo "Since you are compiling for PASE, extracting more symbols from libc.a...">&4 + nm -Tv /lib/libc.a | grep '^\.[a-z]' | awk '$2 == "T" {print $1}' | sed 's/^.//' >> libc.list + ;; +*) if $test -f /lib/syscalls.exp; then echo " " echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4 $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*[ ]*$/\1/p' /lib/syscalls.exp >>libc.list -fi + fi + ;; +esac ;; esac $rm -f libnames libpath diff --git a/MANIFEST b/MANIFEST index f0341a3..f8ab653 100644 --- a/MANIFEST +++ b/MANIFEST @@ -809,6 +809,7 @@ hints/openbsd.sh Hints for named architecture hints/opus.sh Hints for named architecture hints/os2.sh Hints for named architecture hints/os390.sh Hints for named architecture +hints/os400.sh Hints for named architecture hints/posix-bc.sh Hints for named architecture hints/powerux.sh Hints for named architecture hints/qnx.sh Hints for named architecture @@ -2296,6 +2297,7 @@ README.mpeix Notes about MPE/iX port README.netware Notes about NetWare port README.os2 Notes about OS/2 port README.os390 Notes about OS/390 (nee MVS) port +README.os400 Notes about OS/400 port README.plan9 Notes about Plan9 port README.qnx Notes about QNX port README.solaris Notes about Solaris port diff --git a/README.os400 b/README.os400 new file mode 100644 index 0000000..572149b9 --- /dev/null +++ b/README.os400 @@ -0,0 +1,90 @@ +If you read this file _as_is_, just ignore the funny characters you see. +It is written in the POD format (see pod/perlpod.pod) which is specially +designed to be readable as is. + +=head1 NAME + +README.os400 - Perl version 5 on OS/400 + +=head1 DESCRIPTION + +This document describes various features of IBM's OS/400 operating +system that will affect how Perl version 5 (hereafter just Perl) is +compiled and/or runs. + +By far the easiest way to build Perl for OS/400 is to use the PASE +(Portable Application Solutions Environment), for more information see +http://www.iseries.ibm.com/developer/factory/pase/index.html +This environment allows one to use AIX APIs while programming, and it +provides a runtime that allows AIX binaries to execute directly on the +PowerPC iSeries. + +=head2 Compiling Perl for OS/400 PASE + +The recommended way to build Perl for the OS/400 PASE is to build the +Perl 5 source code (release 5.8.1 or later) under AIX. + +The trick is to give a special parameter to the Configure shell script +when running it on AIX: + + sh Configure -DPASE ... + +The default installation directory of Perl under PASE is /QOpenSys/perl. +This can be modified if needed with Configure parameter -Dprefix=/some/dir. + +Starting from OS/400 V5R2 the IBM Visual Age compiler is supported +on OS/400 PASE, so it is possible to build Perl natively on OS/400. +The easier way, however, is to compile in AIX, as just described. + +If building natively on PASE, please do the build under the /QOpenSys +directory, since Perl is happier when built on a case sensitive filesystem. + +=head2 Installing Perl in OS/400 PASE + +If you are compiling on AIX, simply do a "make install" on the AIX box. +Once the install finishes, tar up the /QOpenSys/perl directory. Transfer +the tarball to the OS/400 using FTP with the following commands: + + > binary + > site namefmt 1 + > put perl.tar /QOpenSys + +Once you have it on, simply bring up a PASE shell and extract the tarball. + +If you are compiling in PASE, then "make install" is the only thing you +will need to do. + +The default path for perl binary is /QOpenSys/perl/bin/perl. You'll +want to symlink /QOpenSys/usr/bin/perl to this file so you don't have +to modify your path. + +=head2 Using Perl in OS/400 PASE + +Perl in PASE may be used in the same manner as you would use Perl on AIX. + +Scripts starting with #!/usr/bin/perl should work if you have +/QOpenSys/usr/bin/perl symlinked to your perl binary. This will not +work if you've done a setuid/setgid or have environment variable +PASE_EXEC_QOPENSYS="N". If you have V5R1, you'll need to get the +latest PTFs to have this feature. Scripts starting with +#!/QOpenSys/perl/bin/perl should always work. + +=head2 Perl on ILE + +There exists a port of Perl to the ILE environment. This port, however, +is based quite an old release of Perl, Perl 5.00502 (August 1998). +(As of July 2002 the latest release of Perl is 5.8.0, and even 5.6.1 +has been out since April 2001.) If you need to run Perl on ILE, though, +you may need this older port: http://www.cpan.org/ports/#os400 +Note that any Perl release later than 5.00502 has not been ported to ILE. + +If you need to use Perl in the ILE environment, you may want to consider +using Qp2RunPase() to call the PASE version of Perl. + +=head1 AUTHORS + +Jarkko Hietaniemi +Bryan Logan +David Larson + +=cut diff --git a/hints/aix.sh b/hints/aix.sh index 231d348..bee1479 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -535,4 +535,28 @@ else esac fi +case "$PASE" in +define) + case "$prefix" in + '') prefix=/QOpenSys/perl ;; + esac + cat >&4 <&4 <&4 <. PASE +is ASCII-based, not EBCDIC-based as the ILE. + =item IFS access XXX. diff --git a/pod/perlport.pod b/pod/perlport.pod index 9a76d24..65ca9d8 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -188,9 +188,9 @@ The Unix column assumes that you are not accessing a serial line "\n", and "\n" on output becomes CRLF. These are just the most common definitions of C<\n> and C<\r> in Perl. -There may well be others. For example, on an EBCDIC implementation such -as z/OS or OS/400 the above material is similar to "Unix" but the code -numbers change: +There may well be others. For example, on an EBCDIC implementation +such as z/OS (OS/390) or OS/400 (using the ILE, the PASE is ASCII-based) +the above material is similar to "Unix" but the code numbers change: LF eq \025 eq \x15 eq chr(21) eq CP-1047 21 LF eq \045 eq \x25 eq \cU eq chr(37) eq CP-0037 37 @@ -1136,7 +1136,9 @@ Character Code Set ID 0037 for OS/400 and either 1047 or POSIX-BC for S/390 systems). On the mainframe perl currently works under the "Unix system services for OS/390" (formerly known as OpenEdition), VM/ESA OpenEdition, or the BS200 POSIX-BC system (BS2000 is supported in perl 5.6 and greater). -See L for details. +See L for details. Note that for OS/400 there is also a port of +Perl 5.8.1/5.9.0 or later to the PASE which is ASCII-based (as opposed to +ILE which is EBCDIC-based), see L. As of R2.5 of USS for OS/390 and Version 2.3 of VM/ESA these Unix sub-systems do not support the C<#!> shebang trick for script invocation. @@ -2053,7 +2055,7 @@ First public release with perl5.005. =head1 Supported Platforms -As of June 2002 (the Perl release 5.8.0), the following platforms are +As of July 2002 (the Perl release 5.8.0), the following platforms are able to build Perl from the standard source code distribution available at http://www.cpan.org/src/index.html @@ -2078,6 +2080,7 @@ available at http://www.cpan.org/src/index.html OpenBSD OpenVMS (VMS) OS/2 + OS/400 (using the PASE) (since Perl 5.8.1/5.9.0) PowerUX POSIX-BC (BS2000) QNX @@ -2161,7 +2164,7 @@ binaries available via http://www.cpan.org/ports/ Perl release - OS/400 5.005_02 + OS/400 (ILE) 5.005_02 Tandem Guardian 5.004 The following platforms have only binaries available via @@ -2184,9 +2187,10 @@ L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, -L, L, L, L, L, -L, L, L, L, -L, L, L, and L. +L, L, L, L, +L, L, L, L, +L, L, L, L, +L, and L. =head1 AUTHORS / CONTRIBUTORS