defaults Miscellaneous Build Option (AIX)

Syntax: Default:
defaults( string ) None

This option allows you to specify a predefined option group (or stanza), to use during compilation.

For example, if you specify defaults(xlC), source files are compiled as C++ language source code.

The predefined option groups, represented by string, are listed in the following table.

xlC
vacbld
vacide
xlC128
vacbld128
vacide128
xlC128_r
vacbld128_r
vacide128_r
xlC128_r7
vacbld128_r7
vacide128_r7
xlC_r
vacbld_r
vacide_r
xlC_r4
vacbld_r4
vacide_r4
xlC_r7
vacbld_r7
vacide_r7
xlc xlc128 - - xlc_r xlc_r4 xlc_r7
cc cc128 - - cc_r cc_r4 cc_r7
CC_r4 - - - - - -
c89 - - - - - -

Note that vacbld and vacide are equivalent to xlC, and vacbld and vacide variations are equivalent to xlC variations.

The basic compiler option groups invoke the compiler as indicated below:

xlC
Invokes the compiler so that source files are compiled as C++ language source code. Files with .c file extensions are compiled as C language source code.
xlc
Invokes the compiler for C or C++ source files with a default language level of ansi, and specifies option opt(alias, ansi, yes) to allow type-based aliasing. Use this option group for new C programs.
cc
Invokes the compiler for C source files with a default language level of extended and specifies options gen(readOnly, no) and gen(readOnlyConst, no), to provide compatibility with the RT compiler and placement of string literals or constant values in read/write storage. Use this option group for legacy C code that does not require compliance with ANSI C.
CC_r4
This option group is the equivalent of the xlC_r4 option group.
c89
Invokes the compiler for C source files with a default language level of ansi, and specifies options opt(alias, ansi, yes) to allow type-based aliasing, define("_ANSI_C_SOURCE',1) for ANSI-conformant headers, and lang(longLong, no) to disable use of longlong. Use this option group for strict conformance to the ANSI standard.

Variations of the basic compiler option groups are defined as follows:

Option groups with 128 suffix
These are functionally similar to their corresponding base option group. They specify gen(longDouble, yes) to increase the length of long double types in your program from 64 to 128 bits.
Option groups with _r suffix
In addition to the options set in the base option group, option groups with this suffix set macro names with define("_THREAD_SAFE", 1), define("_AIX32_THREADS",1), and define("_AES_SOURCE",1). They also add the libraries libpthreads.a, libc_r.a, and /usr/lib/libc.a. Use these option group variations if you want to create POSIX-threaded applications.
Option groups with _r4 suffix
In addition to the options set in the base option group, option groups with this suffix set macro names with define("_THREAD_SAFE", 1), define("_AIX32_THREADS",1), and define("_AES_SOURCE",1). They also add the libraries libdcelibc_r.a, libdcepthreads, libpthreads.a, libc_r.a, and libc.a. Use these option group variations if you want to create DCE-threaded applications for AIX.
Options groups with _r7 suffix
In addition to the options set in the base option group, options groups with this suffix set macro names with define("_THREAD_SAFE", 1), and define(_AIX_PTHREADS_D7, 1). For xlc_7 and cc_7, the libraries libpthreads_compat.a, libpthreads.a, libc_r.a, and libc.a are added. For xlC_7, the libraries libC.a, libpthreads_compat.a, libpthreads.a, libc_r.a, libm.a, and /usr/lib/libc.a are added.
Use these option group variations in AIX Version 4.3, for multithread compatibility with AIX Version 4.2.


Incremental C++ Builds
C Compilation


Add or Change Source Files
Set Build Options
Build


Miscellaneous Build Options
Miscellaneous Build Options