Hi Arjen,

thanks for your answer. I do know about these functions, and use them in my own 
programs if appropriate. However, programs
distributed to others for production use should not output this because it confuses users 
(as does "Note: The following floating-point exceptions are signalling: 
IEEE_INVALID_FLAG" which I need to switch off with -ffpe-summary=none).

So I really am looking for strings or other type of info in the binary.

Best wishes,
Kay

On 6/1/22 11:30, Arjen Markus wrote:
Are you perhaps looking for the compiler_version() and compiler_options() 
functions? I use them like this, they were defined in Fortran 2008 if I am not 
mistaken:


                 WRITE( lurep, '(a)' ) 'Report of simulation'
                 WRITE( lurep, '(a)' ) '--------------------'
                 WRITE( lurep, '(a)' ) 'Compiler version: ', compiler_version()
                 WRITE( lurep, '(a)' ) 'Compiler options: ', compiler_options()

Regards,

Arjen

Op wo 1 jun. 2022 om 10:42 schreef Kay Diederichs <kay.diederi...@uni-konstanz.de 
<mailto:kay.diederi...@uni-konstanz.de>>:

    Hi,

    is there any gfortran option and/or version information available from/in a 
binary? Maybe accessible with objdump or strings?

    For ifort, we use the -sox option ("This option tells the compiler to save the 
compilation options and version number in the executable file. ..."). This enables 
e.g.
    strings /path/to/binary | grep Intel

    Or is there a gfortran option that makes this accessible in a binary?

    Thanks,
    Kay



--
Kay Diederichs                http://strucbio.biologie.uni-konstanz.de
email: kay.diederi...@uni-konstanz.de             Tel +49 7531 88 4049
Fachbereich Biologie, Universität Konstanz, Box M647, D-78457 Konstanz

This e-mail is digitally signed. If your e-mail client does not have the
necessary capabilities, just ignore the attached signature "smime.p7s".

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to