HP Fortran Programmer Guide (766160-001, March 2014)

Table 5 Options for controlling code generation (continued)
FunctionOption
Generate debugging information needed by the debugger.
This option is compatible with optimization levels 0, 1, and
-g
2. If you compile and link separately and specify -g on
the command line, you must also specify it on the link line.
nl
For information about using this option to prepare programs
for the debugger, see “Using the HP WDB debugger
(page 76).
Prepare [do not prepare] object files for profiling with
gprof; see the gprof(1) manpage. The default is
+[no]gprof
+nogprof. If you compile and link separately and specify
+gprof on the command line, you must also specify it on
the link line.
nl
For information about using this option to profile programs
with gprof, see gprof” (page 89).
Generate code for programs that reference a very large
number of shared data items. The linker will issue a
+k
diagnostic message in the rare cases when this option is
needed.
NOTE: This option is valid only on the PA-RISC systems.
Generate Position Independent Code (PIC) with short
displacements (+pic=short) or long displacements
+pic={short|long|no}
(+pic=long) for use in shared libraries. The default is
+pic=no.
nl
For information about using this option when creating
shared libraries, see “Compiling with +pic” (page 59).
Prepare [do not prepare] object files for profiling with
prof; see the prof(1) manpage. The default is +noprof.
+[no]prof
If you compile and link separately and specify +prof on
the command line, you must also specify it on the link line.
nl
For information about using this option to profile programs
with prof, see gprof” (page 89).
Save [do not save] all local variables in all subprograms.
nl
+[no]save
For information about using this option when porting, see
“Uninitialized variables” (page 144).
Linker
The linker (ld) builds an executable program from the object files produced by the back end and
the libraries. An important group of options for controlling the linker specify what libraries the
linker should search and where it should search for them. Other options control the type of
information that the linker should or should not include in its output file, such as symbol table
information used by the debugger or marks identifying the output file as shareable or demand
loadable. Table 1-6 lists and briefly describes options that control the linker.
NOTE: If you use the f90 command to compile and link on separate command lines and compile
with any of the options (except -c) listed in Table 1-6, you must specify the same options on the
link line as well.
Table 6 Options for controlling the Linker
FunctionOption
Suppress linking; produce object files only.-c
Mark [do not mark] the output file from the linker demand
load. If you compile and link separately and specify
+[no]demand_load
Linker 15