Object code control

These options affect the characteristics of the object code, preprocessed code, or other output generated by the compiler.

Table 1. Object code control options
Option name Description
-fcommon (-qcommon)

Controls where uninitialized global variables are allocated.

-qeh (C++ only)

Controls whether exception handling is enabled in the module being compiled.

-qinlglue

When used with -O2 or higher optimization, inlines glue code that optimizes external function calls in your application.

-fPIC (-qpic)

Generates position-independent code required for use in shared libraries.

-qpriority (C++ only)

Specifies the priority level for the initialization of static objects.

-r

Produces a nonexecutable output file to use as an input file in another ld command call. This file may also contain unresolved symbols.

-qreserved_reg

Indicates that the given list of registers cannot be used during the compilation except as a stack pointer, frame pointer or in some other fixed role.

-qro

Specifies the storage type for string literals.

-qroconst

Specifies the storage location for constant values.

-qrtti, -fno-rtti (-qnortti) (C++ only)

Generates runtime type identification (RTTI) information for exception handling and for use by the typeid and dynamic_cast operators.

-s

Strips the symbol table, line number information, and relocation information from the output file.

-qsaveopt

Saves the command-line options used for compiling a source file, the user's configuration file name and the options specified in the configuration files, the version and level of each compiler component invoked during compilation, and other information to the corresponding object file.

-ftls-model (-qtls)

Enables recognition of the __thread storage class specifier, which designates variables that are to be allocated thread-local storage; and specifies the threadlocal storage model to be used.

The following options are supported by XL C/C++ for GCC compatibility. For details about these options, see the GNU Compiler Collection online documentation at http://gcc.gnu.org/onlinedocs/.
  • -fpack-struct
  • -fPIE, -fno-PIE
  • -fshort-wchar


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us