is there a way to find out gfortran version and/or options from a given binary?
Arjen Markus
arjen.markus895@gmail.com
Wed Jun 1 11:36:00 GMT 2022
Hm, I ran it without any options - would that be equivalent to -g then? A
rather awkward workaround might be to compile one source file containing
this code with -g, but that is pushing things to the limit.
Regards,
Arjen
Op wo 1 jun. 2022 om 12:16 schreef Kay Diederichs <
kay.diederichs@uni-konstanz.de>:
> I tried your suggestion below, but it does not store the options unless
> the -g option is used.
>
> If -g is used, the executable _always_ has version and option info (no
> extra code invoking compiler_version() and compiler_options() is
> needed). Just use strings <binary> | grep GNU .
> If -g is not used, no option info is in the executable.
>
> Best wishes,
> Kay
>
> On 01.06.22 12:00, Arjen Markus wrote:
> > staticv.f90 --
> > ! Static information about the compiler? Not via parameters
> > !
> > program staticv
> > use iso_fortran_env
> >
> > implicit none
> > character(len=200) :: c, d
> >
> > c = compiler_version()
> > d = compiler_options()
> > write(*,*) c(1:1), d(1:)1
> > end program staticv
> >
>
> --
> Kay Diederichs http://strucbio.biologie.uni-konstanz.de
> email: Kay.Diederichs@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".
>
More information about the Fortran
mailing list