Define symbol name for the preprocessor.
This option only applies to .F, .F90, .F95, and .F03 source files.
–Dname=def Define name to have value def
–Dname Define name to be 1
On the command line, this option will define name as if:
#define name[=def]
had appears in the source file. If no =def specified, the name name is defined as the value 1. The macro symbol name is passed on to the preprocessor fpp (or cpp— see the -xpp option) for expansion.
The predefined macro symbols have two leading underscores. The Fortran syntax may not support the actual values of these macros—they should appear only in fpp or cpp preprocessor directives. (Note the two leading underscores.)
The product version is predefined (in hex) in _ _SUNPRO_F90, and _ _SUNPRO_F95. For example _ _SUNPRO_F95 is 0x830 for the Sun Studio 12 release.
The following macros are predefined on appropriate systems:
_ _sparc, _ _unix, _ _sun, _ _SVR4, __i386 , _ _SunOS_5_6, _ _SunOS_5_7, _ _SunOS_5_8, _ _SunOS_5_9, _ _SunOS_5_10
For instance, the value _ _sparc is defined on SPARC systems.
The following are predefined with no underscores, but they might be deleted in a future release: sparc, unix, sun
On SPARC V9 systems, the _ _sparcv9 macro is also defined.
On 64-bit x86 systems, the macros __amd64 and __x86_64 are defined.
Compile with the verbose option (-v) to see the definitions created by the compiler.
You can use these values in such preprocessor conditionals as the following:
#ifdef _ _sparc
f95 uses the fpp(1) preprocessor by default. Like the C preprocessor cpp(1), fpp expands source code macros and enables conditional compilation of code. Unlike cpp, fpp understands Fortran syntax, and is preferred as a Fortran preprocessor. Use the -xpp=cpp flag to force the compiler to specifically use cpp rather than fpp.