24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

cases, the user is free to override the environment variable with an explicit option<br />

in the config file or the command line.<br />

32-bit mode is invoked by specifying -q32 on the compiler command line and is<br />

the default if OBJECT_MODE is not set. This option is equivalent to a direct<br />

expansion into the -qarch=com option. For the compilers that do not have 64-bit<br />

yet, use of the -q32 and/or the -q64 option will cause the following warning (this is<br />

the usual warning on unrecognized options):<br />

1501-055 Option -q32, -q64 is not recognized and is ignored.<br />

Problems with #pragma arch Suboptions in Source Files<br />

The -q32/64 option has no pragma equivalence because the compilation mode<br />

must be determined before the compiler driver exits and invokes the compiler.<br />

Implicitly expanded options are parsed with the rest of the command line to<br />

produce a final compilation mode. From this compilation mode, the options are<br />

passed separately to the compiler, linker, and assembler. However, since the<br />

ARCH suboption has an equivalent #pragma arch suboption in the source file, the<br />

individual files may be compiled in a different mode than what was decided by the<br />

command line.<br />

It was decided to disallow the setting of a #pragma arch suboption in a source<br />

file. This is a change in <strong>Version</strong> 4.0 of the C compiler that means a loss of<br />

backward compatibility with previous C compiler versions.<br />

Mixed-Mode Compilation and Two-Step Compile and Linking<br />

When you cause a mixed 32- and 64-bit compilation mode, your XCOFF objects<br />

will not bind. This will become obvious if the compile and link occurred in one<br />

step. However, you may not know this if the compile and link occurred in different<br />

steps. In other words, if you compiled and produced 64-bit objects, you need to<br />

remember to link using the 64-bit mode (when linking using xlc), otherwise the<br />

objects will not link. If the objects are in mixed XCOFF mode, then they will never<br />

link, and you must recompile completely, making sure that all objects will be in the<br />

same mode.<br />

There is a set of new configuration file attributes that are used in place of the<br />

normal attributes whenever the compiler determines that the 64-bit mode is<br />

enabled. These new attributes are:<br />

• crt_64<br />

• gcrt_64<br />

• mcrt_64<br />

The new definitions for these attributes are:<br />

crt_64 Path name of the object file passed as the first parameter to the<br />

linkage editor. If you do not specify either -p or the -pg option, the<br />

crt_64 value is used. The default depends on the compiler being used.<br />

gcrt_64 Path name of the object file passed as the first parameter to the<br />

linkage editor. If you specify the -pg option, the gcrt value is used. The<br />

default depends on the compiler being used.<br />

mcrt_64 Path name of the object file passed as the first parameter to the<br />

linkage editor if you have specified the -p option. The default depends<br />

on the compiler being used.<br />

58 <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong> <strong>Differences</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!