The compiler options that are described in this section enable you to do the following:
Some of these options already exist in the 32-bit environment but have new settings particular to the 64-bit architecture. This section only covers the new settings for these cases. The options that are grouped here are primarily for developers who are targetting 64-bit platforms.
Syntax:
-q32
Enables 32-bit compilation bit mode (or, more briefly, 32-bit mode) support in a 64-bit environment. The -q32 option indicates the compilation bit mode and, together with the -qarch option, determines the target machines that the 32-bit executable will run on.
Rules:
Examples
-qarch=ppc -q32
-qarch=ppc -q32 -qarch=rs64a
Notice that the last setting for -qarch wins.
-qarch=ppc -q32 -qarch=rs64a -q64Notice that specifying -q64 overrides the earlier instance of -q32.
Syntax:
-q64={laregetype|nolargetype}
Indicates the 64-bit compilation bit mode and, together with the -qarch option, determines the target machines on which the 64-bit executable will run. The -q64 option indicates that the object module will be created in 64-bit object format and that the 64-bit instruction set will be generated. Note that you may compile in a 32-bit environment to create 64-bit objects, but you must link them in a 64-bit environment with the -q64 option.
Defaults
-q64=largetype is the default setting when compiling with -q64 on AIX 5.1 and above. Use the -q64=largetype suboption to generate the 64-bit LDT ABI. However, -q64=nolargetype can be specified to generate the old 64-bit non-LTD ABI on AIX 5.1 and above.
-q64=nolargetype is the default setting when compiling with -q64 on AIX 4.3.3. Specify the -q64=nolargetype suboption to generate the old 64-bit non-LDT ABI. Specify -q64=largetype to generate 64-bit LDT ABI objects on older versions of AIX that do not support Large Data Types.
Rules:
-q64 -qarch=601will result in the setting -q64 -qarch=ppc along with a warning message.
Restrictions:
/usr/lpp/xlf/include_64ldt.
include_64=/home/joe/inc64dirand the compiler is invoked with the -q64 option on an AIX 5L system, the compiler will actually search:
/home/joe/inc64dirldt.
Examples
In this example 64-bit compilation that targets the RS64I (also known as RS64a):
-q32 -qarch=rs64a -q64
In this example 64-bit compilation that targets the common group of 64-bit architectures (which currently consists only of the RS64I, RS64II, RS64III, POWER3, and POWER4):
-q64 -qarch=com
In this example, the -qarch option conflicts with -q64:
-qarch=601 -q64
which results in a suboption setting of -q64 -qarch=ppc and a warning message.
In the example that follows, the -qarch option conflicts with -q64:
-q64 -qarch=601
which results in a suboption setting of -q64 -qarch=ppc and a warning message.
The following valid example assumes that compilation is on AIX 5L:
xlf90 a.f b.f -q64=largetype -o ldt_app
is equivalent to:
xlf90 a.f b.f -q64 -o ldt_app
because -q64=largetype is the default when compiling on a version of AIX with LDT support.
As this example shows, source files can be compiled on AIX 4.3.3:
xlf90 a.f b.f -q64=largetype -c
However, the resulting object files, a.o and b.o,must now be linked on AIX 5L.
In the following invalid example, an attempt is made to link new 64-bit ABI objects and old 64-bit ABI objects. This will produce an error on any level of AIX:
xlf90 a.f -q64=largetype -c xlf90 b.f -q64=nolargetype -c xlf90 a.o b.o -q64 -o ldt_app
Syntax:
-qarch=rs64a
Indicates that the target architecture for the executable to run on is the RS64I.
Rules:
Related Information:
For more information on the -qarch compiler option, see -qarch Option.
Syntax:
-qarch=rs64b
Indicates that the target architecture for the executable to run on is the RS64II.
Rules:
Related Information:
For more information on the -qarch compiler option, see -qarch Option.
Syntax:
-qarch=rs64c
Indicates that the target architecture for the executable to run on is the RS64III.
Rules:
Related Information:
For more information on the -qarch compiler option, see -qarch Option.
Syntax:
-qtune=rs64a
Tune optimizations for the PowerPC RS64I processor.
You can specify the -qtune=rs64a option when you also specify any of the following options:
The -qtune=rs64a option is the default for the -qarch=rs64a option.
Related Information:
For more information on the -qtune compiler option, see -qtune Option.
Syntax:
-qtune=rs64b
Tune optimizations for the PowerPC RS64II processor.
You can specify the -qtune=rs64b option when you also specify any of the following options:
The -qtune=rs64b option is the default for the -qarch=rs64b option.
Related Information:
For more information on the -qtune compiler option, see -qtune Option.
Syntax:
-qtune=rs64c
Tune optimizations for the PowerPC RS64III processor.
You can specify the -qtune=rs64c option when you also specify any of the following options:
The -qtune=rs64c option is the default for the -qarch=rs64c option.
Related Information:
For more information on the -qtune compiler option, see -qtune Option.
Syntax:
-qwarn64 | -qnowarn64
Aids in porting code from a 32-bit environment to a 64-bit environment by detecting the truncation of an 8-byte integer pointer to 4 bytes. The -qwarn64 option uses informational messages to identify statements that may cause problems with the 32-bit to 64-bit migration. The option name provides compatibility with the C for AIX compiler.
Rules: