Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / man / man1 / perlbs2000.1
CommitLineData
920dae64
AT
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "PERLBS2000 1"
132.TH PERLBS2000 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide"
133.SH "NAME"
134README.BS2000 \- building and installing Perl for BS2000.
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137This document will help you Configure, build, test and install Perl
138on \s-1BS2000\s0 in the \s-1POSIX\s0 subsystem.
139.SH "DESCRIPTION"
140.IX Header "DESCRIPTION"
141This is a ported perl for the \s-1POSIX\s0 subsystem in \s-1BS2000\s0 \s-1VERSION\s0 \s-1OSD\s0
142V3.1A or later. It may work on other versions, but we started porting
143and testing it with 3.1A and are currently using Version V4.0A.
144.PP
145You may need the following \s-1GNU\s0 programs in order to install perl:
146.Sh "gzip on \s-1BS2000\s0"
147.IX Subsection "gzip on BS2000"
148We used version 1.2.4, which could be installed out of the box with
149one failure during 'make check'.
150.Sh "bison on \s-1BS2000\s0"
151.IX Subsection "bison on BS2000"
152The yacc coming with \s-1BS2000\s0 \s-1POSIX\s0 didn't work for us. So we had to
153use bison. We had to make a few changes to perl in order to use the
154pure (reentrant) parser of bison. We used version 1.25, but we had to
155add a few changes due to \s-1EBCDIC\s0. See below for more details
156concerning yacc.
157.Sh "Unpacking Perl Distribution on \s-1BS2000\s0"
158.IX Subsection "Unpacking Perl Distribution on BS2000"
159To extract an \s-1ASCII\s0 tar archive on \s-1BS2000\s0 \s-1POSIX\s0 you need an \s-1ASCII\s0
160filesystem (we used the mountpoint /usr/local/ascii for this). Now
161you extract the archive in the \s-1ASCII\s0 filesystem without
162I/O\-conversion:
163.PP
164cd /usr/local/ascii
165export IO_CONVERSION=NO
166gunzip < /usr/local/src/perl.tar.gz | pax \-r
167.PP
168You may ignore the error message for the first element of the archive
169(this doesn't look like a tar archive / skipping to next file...),
170it's only the directory which will be created automatically anyway.
171.PP
172After extracting the archive you copy the whole directory tree to your
173\&\s-1EBCDIC\s0 filesystem. \fBThis time you use I/O\-conversion\fR:
174.PP
175cd /usr/local/src
176IO_CONVERSION=YES
177cp \-r /usr/local/ascii/perl5.005_02 ./
178.Sh "Compiling Perl on \s-1BS2000\s0"
179.IX Subsection "Compiling Perl on BS2000"
180There is a \*(L"hints\*(R" file for \s-1BS2000\s0 called hints.posix\-bc (because
181posix-bc is the \s-1OS\s0 name given by `uname`) that specifies the correct
182values for most things. The major problem is (of course) the \s-1EBCDIC\s0
183character set. We have german \s-1EBCDIC\s0 version.
184.PP
185Because of our problems with the native yacc we used \s-1GNU\s0 bison to
186generate a pure (=reentrant) parser for perly.y. So our yacc is
187really the following script:
188.PP
189\&\-\-\-\-\-8<\-\-\-\-\-/usr/local/bin/yacc\-\-\-\-\-8<\-\-\-\-\-
190#! /usr/bin/sh
191.PP
192# Bison as a reentrant yacc:
193.PP
194# save parameters:
195params="\*(L"
196while [[ $# \-gt 1 ]]; do
197 params=\*(R"$params \f(CW$1\fR"
198 shift
199done
200.PP
201# add flag \f(CW%pure_parser:\fR
202.PP
203tmpfile=/tmp/bison.$$.y
204echo \f(CW%pure_parser\fR > \f(CW$tmpfile\fR
205cat \f(CW$1\fR >> \f(CW$tmpfile\fR
206.PP
207# call bison:
208.PP
209echo \*(L"/usr/local/bin/bison \-\-yacc \f(CW$params\fR \f(CW$1\fR\et\et\et(Pure Parser)\*(R"
210/usr/local/bin/bison \-\-yacc \f(CW$params\fR \f(CW$tmpfile\fR
211.PP
212# cleanup:
213.PP
214rm \-f \f(CW$tmpfile\fR
215\&\-\-\-\-\-8<\-\-\-\-\-\-\-\-\-\-8<\-\-\-\-\-
216.PP
217We still use the normal yacc for a2p.y though!!! We made a softlink
218called byacc to distinguish between the two versions:
219.PP
220ln \-s /usr/bin/yacc /usr/local/bin/byacc
221.PP
222We build perl using \s-1GNU\s0 make. We tried the native make once and it
223worked too.
224.Sh "Testing Perl on \s-1BS2000\s0"
225.IX Subsection "Testing Perl on BS2000"
226We still got a few errors during \f(CW\*(C`make test\*(C'\fR. Some of them are the
227result of using bison. Bison prints \fIparser error\fR instead of \fIsyntax
228error\fR, so we may ignore them. The following list shows
229our errors, your results may differ:
230.PP
231op/numconvert.......FAILED tests 1409\-1440
232op/regexp...........FAILED tests 483, 496
233op/regexp_noamp.....FAILED tests 483, 496
234pragma/overload.....FAILED tests 152\-153, 170\-171
235pragma/warnings.....FAILED tests 14, 82, 129, 155, 192, 205, 207
236lib/bigfloat........FAILED tests 351\-352, 355
237lib/bigfltpm........FAILED tests 354\-355, 358
238lib/complex.........FAILED tests 267, 487
239lib/dumper..........FAILED tests 43, 45
240Failed 11/231 test scripts, 95.24% okay. 57/10595 subtests failed, 99.46% okay.
241.Sh "Installing Perl on \s-1BS2000\s0"
242.IX Subsection "Installing Perl on BS2000"
243We have no nroff on \s-1BS2000\s0 \s-1POSIX\s0 (yet), so we ignored any errors while
244installing the documentation.
245.Sh "Using Perl in the Posix-Shell of \s-1BS2000\s0"
246.IX Subsection "Using Perl in the Posix-Shell of BS2000"
247\&\s-1BS2000\s0 \s-1POSIX\s0 doesn't support the shebang notation
248(\f(CW\*(C`#!/usr/local/bin/perl\*(C'\fR), so you have to use the following lines
249instead:
250.PP
251: # use perl
252 eval 'exec /usr/local/bin/perl \-S \f(CW$0\fR ${1+\*(L"$@\*(R"}'
253 if \f(CW$running_under_some_shell\fR;
254.ie n .Sh "Using Perl in ""native"" \s-1BS2000\s0"
255.el .Sh "Using Perl in ``native'' \s-1BS2000\s0"
256.IX Subsection "Using Perl in native BS2000"
257We don't have much experience with this yet, but try the following:
258.PP
259Copy your Perl executable to a \s-1BS2000\s0 \s-1LLM\s0 using bs2cp:
260.PP
261\&\f(CW\*(C`bs2cp /usr/local/bin/perl 'bs2:perl(perl,l)'\*(C'\fR
262.PP
263Now you can start it with the following (\s-1SDF\s0) command:
264.PP
265\&\f(CW\*(C`/START\-PROG FROM\-FILE=*MODULE(PERL,PERL),PROG\-MODE=*ANY,RUN\-MODE=*ADV\*(C'\fR
266.PP
267First you get the \s-1BS2000\s0 commandline prompt ('*'). Here you may enter
268your parameters, e.g. \f(CW\*(C`\-e 'print "Hello World!\e\en";'\*(C'\fR (note the
269double backslash!) or \f(CW\*(C`\-w\*(C'\fR and the name of your Perl script.
270Filenames starting with \f(CW\*(C`/\*(C'\fR are searched in the Posix filesystem,
271others are searched in the \s-1BS2000\s0 filesystem. You may even use
272wildcards if you put a \f(CW\*(C`%\*(C'\fR in front of your filename (e.g. \f(CW\*(C`\-w
273checkfiles.pl %*.c\*(C'\fR). Read your C/\*(C+ manual for additional
274possibilities of the commandline prompt (look for
275\&\s-1PARAMETER\-PROMPTING\s0).
276.Sh "Floating point anomalies on \s-1BS2000\s0"
277.IX Subsection "Floating point anomalies on BS2000"
278There appears to be a bug in the floating point implementation on \s-1BS2000\s0 \s-1POSIX\s0
279systems such that calling \fIint()\fR on the product of a number and a small
280magnitude number is not the same as calling \fIint()\fR on the quotient of
281that number and a large magnitude number. For example, in the following
282Perl code:
283.PP
284.Vb 4
285\& my $x = 100000.0;
286\& my $y = int($x * 1e-5) * 1e5; # '0'
287\& my $z = int($x / 1e+5) * 1e5; # '100000'
288\& print "\e$y is $y and \e$z is $z\en"; # $y is 0 and $z is 100000
289.Ve
290.PP
291Although one would expect the quantities \f(CW$y\fR and \f(CW$z\fR to be the same and equal
292to 100000 they will differ and instead will be 0 and 100000 respectively.
293.Sh "Using PerlIO and different encodings on \s-1ASCII\s0 and \s-1EBCDIC\s0 partitions"
294.IX Subsection "Using PerlIO and different encodings on ASCII and EBCDIC partitions"
295Since version 5.8 Perl uses the new PerlIO on \s-1BS2000\s0. This enables
296you using different encodings per \s-1IO\s0 channel. For example you may use
297.PP
298.Vb 9
299\& use Encode;
300\& open($f, ">:encoding(ascii)", "test.ascii");
301\& print $f "Hello World!\en";
302\& open($f, ">:encoding(posix-bc)", "test.ebcdic");
303\& print $f "Hello World!\en";
304\& open($f, ">:encoding(latin1)", "test.latin1");
305\& print $f "Hello World!\en";
306\& open($f, ">:encoding(utf8)", "test.utf8");
307\& print $f "Hello World!\en";
308.Ve
309.PP
310to get two files containing \*(L"Hello World!\en\*(R" in \s-1ASCII\s0, \s-1EBCDIC\s0, \s-1ISO\s0
311Latin\-1 (in this example identical to \s-1ASCII\s0) respective UTF-EBCDIC (in
312this example identical to normal \s-1EBCDIC\s0). See the documentation of
313Encode::PerlIO for details.
314.PP
315As the PerlIO layer uses raw \s-1IO\s0 internally, all this totally ignores
316the type of your filesystem (\s-1ASCII\s0 or \s-1EBCDIC\s0) and the \s-1IO_CONVERSION\s0
317environment variable. If you want to get the old behavior, that the
318\&\s-1BS2000\s0 \s-1IO\s0 functions determine conversion depending on the filesystem
319PerlIO still is your friend. You use \s-1IO_CONVERSION\s0 as usual and tell
320Perl, that it should use the native \s-1IO\s0 layer:
321.PP
322.Vb 2
323\& export IO_CONVERSION=YES
324\& export PERLIO=stdio
325.Ve
326.PP
327Now your \s-1IO\s0 would be \s-1ASCII\s0 on \s-1ASCII\s0 partitions and \s-1EBCDIC\s0 on \s-1EBCDIC\s0
328partitions. See the documentation of PerlIO (without \f(CW\*(C`Encode::\*(C'\fR!)
329for further posibilities.
330.SH "AUTHORS"
331.IX Header "AUTHORS"
332Thomas Dorner
333.SH "SEE ALSO"
334.IX Header "SEE ALSO"
335\&\s-1INSTALL\s0, perlport.
336.Sh "Mailing list"
337.IX Subsection "Mailing list"
338If you are interested in the \s-1VM/ESA\s0, z/OS (formerly known as \s-1OS/390\s0)
339and POSIX-BC (\s-1BS2000\s0) ports of Perl then see the perl-mvs mailing list.
340To subscribe, send an empty message to perl\-mvs\-subscribe@perl.org.
341.PP
342See also:
343.PP
344.Vb 1
345\& http://lists.perl.org/showlist.cgi?name=perl-mvs
346.Ve
347.PP
348There are web archives of the mailing list at:
349.PP
350.Vb 2
351\& http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
352\& http://archive.develooper.com/perl-mvs@perl.org/
353.Ve
354.SH "HISTORY"
355.IX Header "HISTORY"
356This document was originally written by Thomas Dorner for the 5.005
357release of Perl.
358.PP
359This document was podified for the 5.6 release of perl 11 July 2000.