This memo describes the initial release of a GCC R323 for VM.
The code is mostly take from Paul Edward's native MVS port from
( http://www.softlib.org/GCCMVS/gccmvs) which in turn is based
on Dave Pitts IBM390 port of GCC (http://www.cozx.com/~dpitts/gcc.html)
Upload the GCCDIST VMARC file to your VM system in binary mode and make sure that it is in record format "F", with a logical record length of 80. If the uploaded GCCDIST VMARC file is not in the correct format, this simple PIPE command will create one that is:
PIPE < fn VMARC A | fblock 80 00 | > fn VMARC A F 80
Unpack the resultant file using VMARC:
VMARC UNPACK GCCDIST VMARC A = = A
The COMPILER is covered by the GNU public license. The run time library
contained in "CLIBXA TEXT" is Public Domain and you are free to use it
in commercial code.
Note:- Users requiring the source should download the latest version
from spftools and merge it with the library source provided here.
This file contains a GCC compiler that runs on any XA or ESA complient
version of VM and small run time library. The compiler produces standard
ASSEMBLER code that is assembled by the High Level Assembler. This means
that "C" programs which use only the ANSI "C" library can be compiled and
run on any version of ESA and z/VM. The compiler uses only tradional CMS
and CMS emulated MVS system calls and so is an "almost" native GCC.
The compiler and library has had minimal testing. It does contain bugs.
It also has number of restrictions, as below.
Note. Work is in hand to correct the above.
The object release contains the following items-
Users of the compiler will need access to items 1 thru 7 above.
Take care if you have another "C" compiler installed. When using GCC
the "H" files supplied above must be on a disk prior to any other "H"
If you don't have another compiler these files could be installed on
the "Y" disk. If you do you will need to use another disk.
In its simplest form using the compiler is a two stage process.
For example to create "ZCALC MODULE" from "ZCALC C" the following
commands are issued:-
The first compiles and assembles ZCALC. The second loads and GENMODS.
ZCALC can then be run by using the
A more detailed description of the commands follows:-
o GCC EXEC
Because GCC expects UNIX format commands the GCC EXEC has a slightly
odd format. Its format is as follows:-
GCC <fn <ft <fm>> <(options>
Where fn, ft and fm are the CMS file sepcifiers of the source and
options are "normal" GCC options. The compiler proper creates a work
file, "fn $WORK$". This is converted into "fn ASSEMBLER" by GCCREPL.
"ASMAHL" is then called to assemble this file.
If <fm> is specified, and points to a writable disk, the $WORK$ and
ASSEMBLE files are placed on this disk. Otherwise they are placed on
the users "A" disk.
*** WARNING ***
1) If "fm" is specified and a "fn ASSEMBLE" exists on a disk earlier in
access order it will be assembled, not the output of the compiler.
2) The location fo the TEXT deck is left entireley to the assembler.
o CLOADXA EXEC
The CLOADXA exec calls the loader to load one or more TEXT files
together with CLIBXA TEXT and generate a CMS MODULE file. Its format is
CLOADXA text1 <text2 text3... textn>
The module is generated as "text1 MODULE".
File names may be passed to the open routines in three forms:-
fn.ft - Opens CMS file "fn ft"
fn ft - Opens CMS file "fn ft"
dd:dsn - Opens file filedefed as "dsn"
stdin/stdout map to OS DD names SYSIN and SYSPRINT. The start-up code
checks for presence of these DSNs and if they are not found assigned
the device to the CONSOLE.
Please report any bugs to email@example.com.
Many thanks go to the following:-
Dave Pitts - Producing the I370 definitions for GCC
Paul Edwards - Producing PDPLCIB & the MVS3.8 port of GCC
Phil Roberts - Testing and enhancing the above.
Jay Maynard - Creater of Hercules - used for inital port to VM/370R6.
Dave Jones - Providing access to his z/VM system