Using XL Fortran in a 64-Bit Environment

Compiler options for the 64-Bit environment

The 64-bit environment addresses an increasing demand for larger storage requirements and greater processing power. The Linux operating system provides an environment that allows you to develop and execute programs that exploit 64-bit processors through the use of 64-bit address space and 64-bit integers.

To support larger executables that can be fit within a 64-bit address space, a separate, 64-bit object form is used to meet the requirements of 64-bit executables. The linker binds 64-bit objects to create 64-bit executables. Note that objects that are bound together must all be of the same object format. The following scenarios are not permitted and will fail to load, or execute, or both:

On both 64-bit and 32-bit platforms, 32-bit executables will continue to run as they currently do on a 32-bit platform. On 32-bit platforms, 64-bit executables can be generated by specifying the -q64 option.

The XL Fortran compiler mainly provides 64-bit mode support through the compiler option -q64 in conjunction with the compiler option -qarch. This combination determines the bit mode and instruction set for the target architecture. The -q32 and -q64 options take precedence over the setting of the -qarch option. The -q64 option will win over a 32-bit mode only -qarch setting, and the compiler will upgrade the -qarch setting to something that will handle 64-bit mode. Conflicts between the -q32 and -q64 options are resolved by the "last option wins" rule. Setting -qarch=com will ensure future compatibility for applications in 32-bit mode. For 64-bit mode applications, use -qarch=ppc64 to achieve the same effect for all present or future supported 64-bit mode systems. -qarch settings that target a specific architecture, like the rs64b, rs64c, pwr3, pwr4, pwr5, pwr5x, ppc970, and auto settings will be more system-dependent.