None.
Controls whether static or shared runtime libraries are linked into an application.
This option provides the ability to specify linking rules that are equivalent to those implied by the GNU options -static, -static-libgcc, and -shared-libgcc, used singly and in combination.
.-nostaticlink-. >>- -q--+-staticlink---+--+-------------------+---------------->< | .-:----------. | | V | | '-=----+-libgcc-+-+-' '-xllibs-'
-qnostaticlink
This suboption provides the equivalent ability that is enabled by the GNU options -static-libgcc and -shared-libgcc.
When you specify -qstaticlink without suboptions, only static libraries are linked with the object file.
When you specify -qnostaticlink without suboptions, shared libraries are linked with the object file.
If you first specify -qnostaticlink without suboptions and then specify -qstaticlink with or without suboptions, -qnostaticlink is overridden. For example, -qnostaticlink -qstaticlink=xllibs is equivalent to -qstaticlink=xllibs.
Options combination | Compiler behavior |
---|---|
-qstaticlink=libgcc -qnostaticlink | Shared libraries are linked. |
-qstaticlink -qnostaticlink=libgcc | All libraries are linked statically. The compiler issues the following warning message: (W) The options -qnostaticlink=libgcc and -qstaticlink are incompatible. Option -qnostaticlink=libgcc is ignored. |
-qstaticlink -qnostaticlink=libgcc:xllibs | All libraries are linked statically. The compiler issues the following warning messages: (W) The options -qnostaticlink=libgcc and -qstaticlink are incompatible. Option -qnostaticlink=libgcc is ignored. (W) The options -qnostaticlink=xllibs and -qstaticlink are incompatible. Option -qnostaticlink=xllibs is ignored. |
-qstaticlink -qstaticlink=libgcc | All libraries are linked statically. |
-qnostaticlink=libgcc -qstaticlink | All libraries are linked statically. |
Important: Any use of third-party libraries or products is subject to the provisions in their respective licenses. Using the -qstaticlink option can have significant legal consequences for the programs that you compile. It is strongly recommended that you seek legal advice before you use this option.
GNU option | Meaning | XL Fortran option |
---|---|---|
-shared | Build a shared object. | -qmkshrobj 1 |
-static | Build a static object and prevent linking with shared libraries. Every library that is linked to must be a static library. | -qstaticlink |
-shared-libgcc | Link with the shared version of libgcc. | -qnostaticlink=libgcc 2 |
-static-libgcc | Link with the static version of libgcc. You can still link your shared libraries. | -qstaticlink=libgcc |
Notes:
|