The compiling and linking options are given together on the same command line.
As with all systems, when debugging a program compilation should be done with optimization switched off. Once the program is ready for production it should be recompiled (and re-tested) with optimization on. As you will probably have guessed there is no consistency between the optimization options of compilers from different vendors! Some have it on by default, others have it off and they all have different ways of specifying different optimization levels.
Most of the compilers foresee an option to force the static storage of local variables, which means that local variables in a subroutine or function retain their value between calls. This option may be particularly important with older programs that don't use the Fortran SAVE statement. On HP/UX and SGI this option also ensures that all uninitialized variables are initialized to zero. On Sun no compile time option exists. The source code statements AUTOMATIC, SAVE, STATIC must be used. See the Sun Fortran Reference Manual. Use of static mode may reduce the optimization the compiler attempts to provide for your code.
Postpend an underscore to external names such as subroutines, functions and common blocks. This is done by default on all systems apart from AIX/6000 and HP/UX. This seemingly senseless option has the functionality of allowing C programmers to access FORTRAN routines and data according to BSD programming convention. Though this may not be of interest to a new user, this option is nearly a standard in the computing world. ( the CERNLIB routines are compiled with it, which in turn means that you if wish to call VZERO or LENOCC, you must compile your own program with the +ppu option ).