Specifying compiler options under z/OS UNIX

The c89 and xlc utilities invoke the z/OS® XL C/C++ compiler with the C and C++ compiler options. For further information, see Compiler option defaults.

To change compiler options, use an appropriate c89 or xlc utility option. For example, use -I to set the search option that specifies where to search for #include files. If there is no appropriate c89 or xlc option, use -q or -Wc to specify a needed compiler option. For example, specify -Wc,expo to export all functions and variables.

For a complete description of c89, xlc, and related utilities, refer to c89 — Compiler invocation using host environment variables or xlc — Compiler invocation using a customizable configuration file.

For compiler options that take file names as suboptions, you can specify a sequential data set, a partitioned data set, or a partitioned data set member by prefixing the name with two slashes ('//'). The rest of the name follows the same syntax rule for naming data sets. Names that are not preceded with two slashes are z/OS UNIX file names. For example, to specify HQ.PROG.LIST as the source listing file (HQ being the high-level qualifier), use SOURCE(//'HQ.PROG.LIST'). The single quotation mark is needed for specifying a full file name with a high-level qualifier.

Note: Both the IPA link step (since z/OS V1R8) and IPA compile step (since z/OS V1R12) make use of 64-bit virtual memory, which might cause the z/OS XL C/C++ compiler to abend if there is insufficient storage. Increasing the default MEMLIMIT system parameter size in the SMFPRMx parmlib member to 3000 MB can overcome the problem. The default takes effect if a job does not specify MEMLIMIT in the JCL JOB or EXEC statement, or REGION=0 in the JCL; the MEMLIMIT specified in an IEFUSI exit routine overrides all other MEMLIMIT settings. For information on the ulimit command, which can be used in z/OS UNIX to set MEMLIMIT, see z/OS UNIX System Services Command Reference. For additional information about the MEMLIMIT system parameter, see z/OS MVS Programming: Extended Addressability Guide.