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

3.4 Options Reference

-xlinkopt cannot be used together with -xinstrument.

3.4.150 –xloopinfo

Synonym for -loopinfo.

3.4.151 –xM

Generate make dependencies.

This option produces make dependencies for the compiled source file on standard output. The option covers all make dependencies for the source file, both header files and Fortran modules.

For module dependencies, this option uses an object-based module dependency scheme to eliminate the need for explicit build rules to create the module files.

This compilation cannot be used with -c, -S, or any other compilation options that produce different compilation outputs.

The generated dependency output does not contain any build rules, only dependencies for the files. The user will need to specify the build rules for all the files needed for the build. However, for the module files, no explicit build rules are needed, as the module files are created at the same time as the associated object files. Therefore, the module files only need to have a generic build rule:

%.mod:

@ echo $@ is already up to date.

The module file build rule is only needed to prevent the 'make' process from stripping all the dependencies related to module files if there are no build rules for them. Other than that, the build rule does not do anything, as shown in the example above.

When used with the -keepmod option, the dependencies generated by the -xM option will prevent compilation cascade due to the unnecessarily updated modules files, as well as prevent the problem with recompilation on the same source files due to the use of the -keepmod option to prevent unnecessary updates on the module files.

This option works in conjunction with the -M, -I, and -moddir options to determine the appropriate directories for the module files needed in the build. Pre-compiled module files, for example those shipped by third parties, should be located at a directory pointed to by the -M option so the correct dependencies can be generated.

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

3.4 Options Reference

3.4.152 –xmaxopt[=n]

Enable optimization pragma and set maximum optimization level.

n has the value 1 through 5 and corresponds to the optimization levels of -O1 through -O5. If not specified, the compiler uses 5.

This option enables the !$PRAGMA SUN OPT=n directive when it appears in the source input. Without this option, the compiler treats these lines as comments. See “2.3.1.5 The OPT Directive” on page 33.

If this pragma appears with an optimization level greater than the maximum level on the - xmaxopt flag, the compiler uses the level set by -xmaxopt.

3.4.153 –xmemalign[=<a><b>]

(SPARC) Specify maximum assumed memory alignment and behavior of misaligned data accesses.

For memory accesses where the alignment is determinable at compile time, the compiler will generate the appropriate load/store instruction sequence for that data alignment.

For memory accesses where the alignment cannot be determined at compile time, the compiler must assume an alignment to generate the needed load/store sequence.

The -xmemalign flag allows the user to specify the maximum memory alignment of data to be assumed by the compiler for those indeterminate situations. It also specifies the error behavior at runtime when a misaligned memory access does take place.

The value specified consists of two parts: a numeric alignment value, <a>, and an alphabetic behavior flag, <b>.

Allowed values for alignment, <a>, are:

1

Assume at most 1-byte alignment.

2

Assume at most 2-byte alignment.

4

Assume at most 4-byte alignment.

8

Assume at most 8-byte alignment.

16

Assume at most 16-byte alignment.

Chapter 3 • Fortran Compiler Options

141

3.4 Options Reference

Allowed values for error behavior on accessing misaligned data, <b>, are:

i

Interpret access and continue execution

s

Raise signal SIGBUS

f

On 64–bit platforms, raise signal SIGBUS only for alignments less or

 

equal to 4, otherwise interpret access and continue execution. On other

 

platforms f is equivalent to i.

The defaults when compiling without -xmemalign specified are:

8i for 32–bit platforms

8s for 64–bit platforms with C and C++

8f for 64–bit platforms with Fortran

The default for -xmemalign appearing without a value is 1i for all platforms.

Note that -xmemalign itself does not force any particular data alignment to take place. Use - dalign or -aligncommon to force data alignment.

You must also specify -xmemalign whenever you link to an object file that was compiled with a b value of either i or f.

The -dalign option is a macro:

-dalign is a macro for: -xmemalign=8s -aligncommon=16

Do not use -aligncommon=1 with -xmemalign as these declarations will conflict and could cause a segmentation fault on some platforms and configurations.

See “3.4.1 –aligncommon[={1|2|4|8|16}]” on page 54 for details.

3.4.154 –xmodel=[small | kernel | medium]

(x86) Specify the data address model for shared objects on Oracle Solaris x64 platforms.

The -xmodel option enables the compiler to create 64bit shared objects for the Oracle Solaris x64 platforms and should only be specified for the compilation of such objects.

This option is invalid when specified with -m32.

small

This option generates code for the small model in which the virtual

 

address of code executed is known at link time and all symbols are

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

 

3.4 Options Reference

 

 

 

known to be located in the virtual addresses in the range from 0 to 231

 

224 - 1.

kernel

Generates code for the kernel model in which all symbols are defined to

 

be in the range from 264 - 231 to 264 - 224.

medium

Generates code for the medium model in which no assumptions are

 

made about the range of symbolic references to data sections. Size

 

and address of the text section have the same limits as the small code

 

model. Applications with large amounts of static data might require -

 

xmodel=medium when compiling with —m64.

If you do not specify -xmodel, the compiler assumes -xmodel=small. Specifying -xmodel without an argument is an error.

It is not necessary to compile all routines with this option as long as you an ensure that objects being accessed are within range.

3.4.155 –xnolib

Synonym for -nolib.

3.4.156 –xnolibmil

Synonym for -nolibmil.

3.4.157 –xnolibmopt

(Obsolete) Use -xlibmopt=%none instead. See “3.4.23 –fast” on page 66, “3.4.148 – xlibmopt[={%none,archive,shared}]” on page 137.

3.4.158 –xOn

Synonym for -On.

Chapter 3 • Fortran Compiler Options

143

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