Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer of Update GCC HELPCMD and GCC HELPCMD2 #50

Open
marXtevens opened this issue Nov 14, 2021 · 0 comments
Open

Offer of Update GCC HELPCMD and GCC HELPCMD2 #50

marXtevens opened this issue Nov 14, 2021 · 0 comments

Comments

@marXtevens
Copy link
Collaborator

For your consideration. If I need to put this in another format, or another place, please let me know.

GCC HELPCMD
******************************************************************************
GCC                                                                    CMS EXEC
 
Use the GCC command to compile and assemble a C source file using the GNU C
compiler.  Then use the LOAD and START commands to run the program:

   gcc hello
   load hello
   start

The format of the GCC command is:
+----------+------------------------------------------------------------------+
| GCC      | [fn [ft|C [fm|A]]] [( [options]                                  |
|          | options:                                                         |
|          |    ASM|NOASM     CSECT|NOCSECT     KEEP|NOKEEP     LIB fn        |
|          |    OS|CMS        PARM fn                                         |
+----------+------------------------------------------------------------------+
where:
 
fn [ft [fm]]
         identifies the C source file to be compiled.  ft defaults to C and fm
         defaults to A.
 
Options:
 
ASM|NOASM
         specifies whether the ASSEMBLE output file from the C compiler is to
         be assembled or not.  ASM is the default.
 
CSECT|NOCSECT
         specifies that the blank CSECT statement produced by GCC is to be
         given a label. NOCSECT is the default.  CSECT is required only when
         building a library of C routines.
 
KEEP|NOKEEP
         specifies whether or not the assembler output files from the C
         compiler are to be kept or erased.  NOKEEP is the default.
 
LIB fn   specifies the runtime library with which the program is to be
         compiled.  GCC will link and access the appropriate disk containing
         the C header files.  Two runtime libraries are available:
         GCCLIB  uses only "native" CMS functions for system services.  Using
                 this library it is possible to write programs that may be
                 loaded into resident memory as extensions of the CMS nucleus.
                 For example, you can open CMS files directly by name.
 
                 Ensure GCCLIB is in your list of GLOBAL TXTLIBs to run your
                 compiled progam.  Type HELP GCCLIB for more information.
 
         PDPCLIB uses simulated OS functions for system services, just like
                 FORTRAN or PL/I.  For example, you must use the FILEDEF
                 command to identify CMS files to your program.
 
                 Ensure PDPCLIB is in your list of GLOBAL TXTLIBs to run your
                 compiled progam.
 
         LIB PDPCLIB is the default.
 
OS|CMS   OS is shorthand for LIB PDPCLIB.  CMS is shorthand for LIB GCCLIB.
 
PARM fn  specifies a file of type PARM containg arguments to pass to GCC.  By
         default 'GCC PARM *' is used.  The fn PARM file may be RECFM F|V,
         and the LRECL may be anything less than 32767 characters in length.

 
For more details, type HELP GCC ( MORE

------------------------------------------------------------------------------
For your consideration ...

Would the 'fn' of 'PARM fn' be better off looking for the 'fn' found in the
EXEC when it is executed?

Such as:

GCC ZIP C A

would then search for ZIP PARM * ?
------------------------------------------------------------------------------
******************************************************************************
GCC HELPCMD2
*******************************************************************************
GCC                                                                    CMS EXEC
 
Usage Notes:
 
1.  To compile a C program called HELLO C A, type
       GCC HELLO
    To run the program, you must have the appropriate TXTLIB specified.  Use
    the GLOBAL command to do this:
       GLOBAL TXTLIB PDPCLIB
    Now you can load and run the program:
       LOAD HELLO
       START
    Alternatively you can create a module of your program:
       LOAD HELLO
       GENMOD HELLO
    Now you can invoke the program by typing its name:
       HELLO
 
2.  If your program does any I/O you must use the FILEDEF command to define
    those files to your program.  Then in the program refer to the ddname you
    specified on the FILEDEF command.  For example, if in your C program you
    code:
       fopen("DD:TEST", "w");
    You would need to issue this FILEDEF command before running the program:
       FILEDEF TEST DISK TEST DATA A (LRECL 80 RECFM V
 
3.  The source code for the GCC compiler and runtime libraries is on the
    GCCCMS userid disks.
 
4.  An alternate runtime library called GCCLIB is available for C programs.
    This runtime library lets you code C programs that directly access CMS
    system services.  Type HELP GCCLIB for more information.

-------------------------------------------------------------------------------
For your consideration. I do not know which of the following is correct, but
it would be helpful for the user to know.
 
The following options can be placed in the file 'fn PARM *' referenced by
the 'PARM fn' option on the command line. The fn PARM file may be
RECFM F|V, and the LRECL may be anything less than 32767 characters in
length.

(
The options MAY exist on multiple records.
-or-
The options MUST exist on one record.
)

(
The continuation character is identified as '|'.
-or-
There is NO continuation charcter.
)
-------------------------------------------------------------------------------

Options: 
  -pass-exit-codes         Exit with highest error code from a phase 
  --help                   Display this information 
  --target-help            Display target specific command line options 
  (Use '-v --help' to display command line options of sub-processe s) 
  -dumpspecs               Display all of the built in spec strings 
  -dumpversion             Display the version of the compiler 
  -dumpmachine             Display the compiler's target processor 
  -print-search-dirs       Display the directories in the compiler's search
                           path 
  -print-libgcc-file-name  Display the name of the compiler's companion library 
  -print-file-name=<lib>   Display the full path to library <lib> 
  -print-prog-name=<prog>  Display the full path to compiler component <prog> 
  -print-multi-directory   Display the root directory for versions of libgcc 
  -print-multi-lib         Display the mapping between command line options and 
                           multiple library search directories 
  -print-multi-os-directory Display the relative path to OS libraries 
  -Wa,<options>            Pass comma-separated <options> on to the assembler
  -Wp,<options>            Pass comma-separated <options> on to the
                           preprocessor
  -Wl,<options>            Pass comma-separated <options> on to the linker 
  -Xlinker <arg>           Pass <arg> on to the linker 
  -save-temps              Do not delete intermediate files 
  -pipe                    Use pipes rather than intermediate files 
  -time                    Time the execution of each subprocess
  -specs=<file>            Override built-in specs with the contents of <file> 
  -std=<standard>          Assume that the input sources are for <standard> 
  -B <directory>           Add <directory> to the compiler's search paths 
  -b <machine>             Run gcc for target <machine>, if installed 
  -V <version>             Run gcc version number <version>, if installed 
  -v                       Display the programs invoked by the compiler 
  -###                     Like -v but options quoted and commands not executed 
  -E                       Preprocess only; do not compile, assemble or link 
  -S                       Compile only; do not assemble or link 
  -c                       Compile and assemble, but do not link 
  -o <file>                Place the output into <file> 
  -x <language>            Specify the language of the following input files
                           Permissable languages include: c c++ assembler none
                           'none' means revert to the default behavior of
                           guessing the language based on the file's extension 
 
Options starting with -g , -f, -m, -O, -W, or --param are automatically 
 passed on to the various sub-processes invoked by CP.  In order to pass 
 other options on to these processes the -W<letter> options must be used.

Additional information on gcc can be found at:
https://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/index.html
*******************************************************************************

... Mark S.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant