Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

3.4 Options Reference

prevents cascading compilation for the source files depending on this module file. This is very helpful in an incremental build and can significantly reduce the build time.

When this option is used with user-specified dependencies and the user has an explicit build rule on how to create the module with a dependency on the corresponding source file, the option can cause the source file to be recompiled multiple times even though the source file is modified only once because of the outdated time stamp of the module file.

3.4.53–keeptmp

Retains the temporary files that are created during compilation.

3.4.54–Kpic

(Obsolete) Synonym for -pic.

3.4.55–KPIC

(Obsolete) Synonym for -PIC.

3.4.56–Lpath

Add path to list of directory paths to search for libraries.

Adds path to the front of the list of object–library search directories. A space between -L and path is optional. This option is passed to the linker. See also “3.4.57 –lx on page 82.

While building the executable file, ld(1) searches path for archive libraries (.a files) and shared libraries (.so files). ld searches path before searching the default directories. For the relative order between LD_LIBRARY_PATH and -Lpath, see ld(1).

Note - Specifying /usr/lib or /usr/ccs/lib with -L path may prevent linking the unbundled libm. These directories are searched by default.

Chapter 3 • Fortran Compiler Options

81

3.4 Options Reference

Example: Use -Lpath to specify library search directories:

demo% f95 -L./dir1 -L./dir2 any.f

3.4.57–lx

Add library libx.a to linker’s list of search libraries.

Pass -lx to the linker to specify additional libraries for ld to search for unresolved references. ld links with object library libx. If shared library libx.so is available (and -Bstatic or -dn are not specified), ld uses it, otherwise, ld uses static library libx.a. If it uses a shared library, the name is built in to a.out. No space is allowed between -l and x character strings.

Example: Link with the library libVZY:

demo% f95 any.f -lVZY

Use -lx again to link with more libraries.

Example: Link with the libraries liby and libz:

demo% f95 any.f -ly -lz

3.4.58–libmil

Inline selected libm library routines for optimization.

There are inline templates for some of the libm library routines. This option selects those inline templates that produce the fastest executable for the floating–point options and platform currently being used.

For more information, see the man pages libm_single(3F) and libm_double(3F)

3.4.59-library=sunperf

Link with the Oracle Developer Studio supplied performance libraries. See the Oracle Developer Studio 12.6: Performance Library User’s Guide.

82 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.4 Options Reference

3.4.60–loopinfo

Show loop parallelization results.

Show which loops were and were not parallelized with the –autopar option.

–loopinfo displays a list of messages on standard error:

demo% f95 -c -fast -autopar -loopinfo shalow.f

...

"shalow.f", line 172: PARALLELIZED, and serial version generated "shalow.f", line 173: not parallelized, not profitable "shalow.f", line 181: PARALLELIZED, fused

"shalow.f", line 182: not parallelized, not profitable

...

...etc

3.4.61–Mpath

Specify MODULE directory, archive, or file.

Look in path for Fortran modules referenced in the current compilation. This path is searched in addition to the current directory.

path can specify a directory, .a archive file of precompiled module files, or a .mod precompiled module file. The compiler determines the type of the file by examining its contents.

An archive .a file must be explicitly specified on a -M option flag to be searched for modules. The compiler will not search archive files by default.

Only .mod files with the same names as the MODULE names appearing on USE statements will be searched. For example, the statement USE ME causes the compiler to look only for the module file me.mod

When searching for modules, the compiler gives higher priority to the directory where the module files are being written. This is controlled by the -moddir compiler option, or the MODDIR environment variable. When neither are specified, the default write-directory is the current directory. When both are specified, the write-directory is the path specified by the -moddir flag.

This means that if only the -M flag appears, the current directory will be searched for modules first before any object listed on the -M flag. To emulate the behavior of previous releases, use:

-moddir=empty-dir -Mdir -M

Chapter 3 • Fortran Compiler Options

83

3.4 Options Reference

where empty-dir is the path to an empty directory.

Directories named in —I path will be searched for module files if the files are not found in any of the other locations that are searched.

A space between the -M and the path is allowed. For example, -M /home/siri/PK15/Modules

On Oracle Solaris, if the path identifies a regular file that is not an archive or a module file, the compiler passes the option to the linker, ld, which will treat it as a linker mapfile. This feature is provided as a convenience similar to the C and C++ compilers.

See “4.9 Module Files” on page 192 for more information about modules in Fortran.

3.4.62–m32 | –m64

Specifies the data type model for compiled binary object.

Use -m32 to create 32-bit executables and shared libraries. Use -m64 to create 64-bit executables and shared libraries.

Object files or libraries compiled with -m32 cannot be linked with object files or libraries compiled with -m64.

When compiling applications with large amounts of static data on x64 platforms using -m64, -xmodel=medium may also be required. Be aware that some Oracle Linux platforms do not support the medium model.

Modules that are compiled with -m32 |-m64 must also be linked with -m32 |-m64.

On Oracle Solaris systems, -m32 is the default. On Oracle Linux systems, -m64 is the default.

3.4.63–moddir=path

Specify where the compiler will write compiled .mod MODULE files.

The compiler will write the .mod MODULE information files it compiles in the directory specified by path. The directory path can also be specified with the MODDIR environment variable. If both are specified, this option flag takes precedence.

The compiler uses the current directory as the default for writing .mod files.

84 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

Соседние файлы в предмете Информационные и сетевые технологии