From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id A909238582B8 for ; Wed, 1 Jun 2022 11:36:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A909238582B8 Received: by mail-pf1-x42f.google.com with SMTP id u2so1735142pfc.2 for ; Wed, 01 Jun 2022 04:36:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+7xpvVL9lc0Mv1RNpCi58B5Twdv0vv75X7xcitwvG+o=; b=k4oYmkTNiPi6L6kL5jNScxINc2Uy6lhn1o0fAvfjy/a4GjFchwBWEUj/QarzygM6il 9ZZ4Znvmm8zyly2VKWN2a5zqNhnIA4bQPfAa2dFHIULYBU8XTZ8gmwzd0Nd0YlcLQE5n z3RqwuSFOxryi2nKAcQAQe2PDh+AWKF1t//WFuBqchfDZVfa8SCRjvdKg8xYo++YiMMF LhlMjgcNiZGiXlXLCJzDLAfNT1crnNVncSq/8M+ZmS/KZ8sKEPAL433EhyGFR/RJq9Eq 7Hx9n4zOY2h73j5XDQJLsFq6st9PV3ML4wPctFgSA/mv/ezJaXQMizuRUueOorp7lZvK ThhA== X-Gm-Message-State: AOAM530eDV/vzqsFS6yp5qh34InIXP3mgcQ6QhlSi2kRk+5yWZN9Rnmd yvn9BdiSPSYni9RJM9DBbURGv99v+l76x0StphU= X-Google-Smtp-Source: ABdhPJz3O5azXP92BinXDeUu1n6UVjCDnhY26w0RwtPEaAsxY3DNZg/e+Fi4j9iRK71t1kYyHtzdXpW9FNGuKEqvJDU= X-Received: by 2002:a63:6bc2:0:b0:3fb:3c34:4110 with SMTP id g185-20020a636bc2000000b003fb3c344110mr24826297pgc.206.1654083371561; Wed, 01 Jun 2022 04:36:11 -0700 (PDT) MIME-Version: 1.0 References: <20220601115026.452a6840@vepi2> In-Reply-To: From: Arjen Markus Date: Wed, 1 Jun 2022 13:36:00 +0200 Message-ID: Subject: Re: is there a way to find out gfortran version and/or options from a given binary? To: Kay Diederichs Cc: Andre Vehreschild , Fortran List X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2022 11:36:14 -0000 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 | 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=3D200) :: c, d > > > > c =3D compiler_version() > > d =3D 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=C3=A4t Konstanz, Box M647, D-78457 Konsta= nz > > This e-mail is digitally signed. If your e-mail client does not have the > necessary capabilities, just ignore the attached signature "smime.p7s". >