[petsc-dev] [buildsystem] fortranlib-autodetection
Satish Balay
balay at mcs.anl.gov
Mon Apr 11 09:43:58 CDT 2011
right now - you can do this with:
--with-clib-autodetect=0 --with-fortranlib-autodetect=0 --with-cxxlib-autodetect=0 LIBS="-Bstatic -lfoo -Bdynamic"
or whatever the correct interlanguage library interoperability list
is..
Satish
On Mon, 11 Apr 2011, Chen Shen wrote:
> Hi all,
>
> In config/compilers: checkFortranLibraries(), we run the fortran linker with
> -v options, and detect the list of fortran libraries to be linked. I can see
> that -L -l and -rpath options are parsed, and finally added to the
> PCC_LINKER_LIBS macro.
>
> The default behavior of ifort/icc is to link to the static version of the
> following libs: imf, svml, ifport, ifcore, etc, so ifort -v will output the
> -Bstatic option for these libraries.
>
> However, -Bstatic and -Bdynamic options are ignored in
> checkFortranLibraries(). Because -Bdynamic is the default for GCC/ICC, the
> dynamic library will be linked to the final application program. It is
> therefore impossible to link to the static version of intel libraries.
>
> Currently I ignore PCC_LINKER_LIBS and do my own detection. Fortunately I am
> dealing with fewer systems/compilers, and a dirty script sufficed.
> But I guess it's best to detect -Bstatic/-Bdynamic
> in checkFortranLibraries(). The same comments apply to clib-autodetection.
> Do you think this is the way to go? Thanks!
>
>
> Best regards,
> Shen Chen
>
More information about the petsc-dev
mailing list