Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.4.142 –xlang=f77

(SPARC) Prepare for linking with runtime libraries compatible with objects created by earlier versions of the legacy f77 compiler.

f95 -xlang=f77 implies linking with the f77compat library, and is a shorthand way for linking f95 object files with older Fortran 77 object files. Compiling with this flag insures the proper runtime environment.

Use f95 -xlang=f77 when linking f95 and f77 compiled objects together into a single executable.

Note the following when compiling with -xlang:

  • Do not compile with both -xnolib and -xlang.

  • When mixing Fortran object files with C++, link using the C++ compiler and specify -xlang=f95 on the CC command line.

  • When mixing C++ objects with Fortran object files compiled with any of the parallelization options, the linking CC command line must also specify -mt.

To determine which driver to use for mixed-language linking , use the following language hierarchy:

C++

Use the CC command. See the C++ Uder's Guide for details.

Fortran 95 (or Fortran 90)

Use the f95 command.

Fortran 77

Use f95 -xlang=f77.

C

Use the cc command. See the C Uder's Guide for details.