12.07.2015 Views

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 2 Developing with LF64Note that using --zfm will disable trapping for floating underflow. If an underflow conditionoccurs during execution of an SSE instruction, the affected variable is set to zero. If thisbehavior presents a problem, use the --nzfm option to guarantee that the underflow exceptionis thrown.Linking RulesDuring the link phase, the driver submits object files and object file libraries to the linker forcreation of the executable (or shared library) output file.Fortran 95 ModulesIf your program uses Fortran modules that have already been compiled, you must add themodule object filenames (i.e., the source filename with extension .o) to the LF64 commandline when linking. Compiling a Fortran module will generate an object (.o) file and a module(.mod) file if the source file contains executable code. If the source file does not contain anyexecutable code but does contain public entities, then only a .mod file will be generated.How the Linker Finds LibrariesThe linker reads individual object files and object module libraries, resolves references toexternal symbols, and writes out a single executable file (or shared library).If an object file or library was specified on the command line and contains path information,then it must reside at the location specified. If the path was not specified, the linker looks forthe files in the following order:1. in any directories specified with the -L option.2. in any directories specified by the LD_LIBRARY_PATH environment variable.Note: the current working directory “.” will not be searched unless it is specified by the -Loption or the LD_LIBRARY_PATH environment variable.In each case, the linker will first attempt to locate a shared library (with a .so file extension)containing the desired symbol(s). If that is not found, then it will seek an archive or staticlibrary (with a .a file extension). The --staticlink option does not affect this behavior;this option only determines the specific group of runtime libraries that will be linked to theexecutable.Searching rules for INCLUDE files and Fortran 95 modules are governed by the compiler,not the linker. See “-I dir” on page 25 and “-M dir” on page 31 for discussion.Object File Processing RulesObject files are processed in the order they appear on the command line.44 <strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!