16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

c89, cc, and c++<br />

Options<br />

utilities. See z/<strong>OS</strong> Introduction and Release Guide for further details. Also see<br />

prefix_CLIB_PREFIX and prefix_PLIB_PREFIX in “Environment variables” on page<br />

84 for information about the names of the z/<strong>OS</strong> XL C/C++ Optional Feature data<br />

sets that must be made available to c89/cc/c++.<br />

Note: The term prefix is defined in “Environment variables” on page 84.<br />

First, c89, cc, and c++ perform the compilation phase (including preprocessing) by<br />

compiling all source file operands (file.C, file.i, and file.c, as appropriate). For c++, if<br />

automatic template generation is being used (which is the default), then z/<strong>OS</strong> XL<br />

C++ source files may be created or updated in the tempinc subdirectory of the<br />

working directory during the compilation phase (the tempinc subdirectory will be<br />

created if it does not already exist). Then, c89, cc, and c++ perform the assemble<br />

phase by assembling all operands of the file.s form. The result of each compile step<br />

and each assemble step is a file.o file. If all compilations and assemblies are<br />

successful, or if only file.o and/or file.a files are specified, c89, cc, and c++ proceed<br />

to the link-editing phase. For c++, the link-editing phase begins with an automatic<br />

template generation step when applicable. For IPA (Interprocedural Analysis)<br />

optimization an additional IPA Link step comes next. The link-edit step is last. See<br />

the environment variable prefix_STEPS under “Environment variables” on page 84<br />

for more information about the link-editing phase steps.<br />

In the link-editing phase, c89, cc, and c++ combine all file.o files from the<br />

compilation phase along with any file.o files that were specified on the command<br />

line. For c++, this is preceded by compiling all z/<strong>OS</strong> XL C++ source files in the<br />

tempinc subdirectory of the working directory (possibly creating and updating<br />

additional z/<strong>OS</strong> XL C++ source files during the automatic template generation step).<br />

After compiling all the z/<strong>OS</strong> XL C++ source files, the resulting object files are<br />

combined along with the file.o files from the compilation phase and the command<br />

line. Any file.a files, file.x files and -l libname operands that were specified are also<br />

used.<br />

The usual output of the link-editing phase is an executable file. For c89, cc, and<br />

c++ to produce an executable file, you must specify at least one operand which is<br />

of other than -l libname form. If -r is used, the output file is not executable.<br />

For more information about automatic template generation, see z/<strong>OS</strong> XL C/C++<br />

User’s Guide and the information on ″Using TEMPINC or NOTEMPINC″ in z/<strong>OS</strong> XL<br />

C/C++ Programming Guide. Note that the c++ command only supports using the<br />

tempinc subdirectory of the working directory for automatic template generation.<br />

IPA is further described under the -W option on page 78.<br />

–+ Specifies that all source files are to be recognized as C++ source files. All<br />

file.s, file.o, and file.a files will continue to be recognized as assembler<br />

source, object, and archive files respectively. However, any C file.c or file.i<br />

files will be processed as corresponding C++ file.C or file.i files, and any<br />

other file suffix which would otherwise be unrecognized will be processed<br />

as a file.C file.<br />

This option effectively overrides the environment variable<br />

prefix_EXTRA_ARGS. This option is only supported by the c++ command.<br />

-C Specifies that C and C++ source comments should be retained by the<br />

70 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!