From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by sourceware.org (Postfix) with ESMTPS id D428D395563E for ; Thu, 2 Jun 2022 19:06:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D428D395563E Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-edeb6c3642so7936700fac.3 for ; Thu, 02 Jun 2022 12:06:59 -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=q+hEmi/1SGNchlyYFZzyNjpK6DXEEHyZHTmeGjD5ZvA=; b=n0kiMrxwPRfpwpLzyHtlfdX4X8Iq0AHwokqDlVhHaAaTrmKXbJ76fn0GpqDvD+AdcI +CZapRBV00gloKwd3html8ii1vhyp1XcLwa/UlZfKX0Ji8qrfBpdl85I6iaSux4wp+Ol jVaC2eCezWyT8j9af6x0N+7Oucc9cKB16+Xpc/EfmilonEXRfgA/hEyl0Vpn1vYVpdNF nbGB5vk49QMHN03+OLki8drvuJr6lK7JkeOT1xrlyc5wegdHKXVudkDSvTpWMRGCAbiy EvmioXGZBKEnNbJowd7ycrDtm3FZhIqHNAD93N0LD6EXuUDH8NgEieXn2jw5T1+bQhM5 QheQ== X-Gm-Message-State: AOAM533D0GYnme7vsI4MX9zf5lXtDNzniyJUqt8WuxEuEtF5AFYPkDhO +0HshiOBDgROGCV8qBd2NCGXaaYQxRX3zzk9Jfc= X-Google-Smtp-Source: ABdhPJxCqb2VCPUXUD24L8QZfN8Gps9pPAZOyslwyKARQM80gojzYz+NsjVmVgmXbLEwQnq/CWIqoYzFG/yjwwR4UPg= X-Received: by 2002:a05:6870:430d:b0:f2:d28b:3444 with SMTP id w13-20020a056870430d00b000f2d28b3444mr21022760oah.211.1654196819127; Thu, 02 Jun 2022 12:06:59 -0700 (PDT) MIME-Version: 1.0 References: <20220601115026.452a6840@vepi2> In-Reply-To: From: Janne Blomqvist Date: Thu, 2 Jun 2022 22:06:48 +0300 Message-ID: Subject: Re: is there a way to find out gfortran version and/or options from a given binary? To: Kay Diederichs Cc: Arjen Markus , Andre Vehreschild , Fortran List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: Thu, 02 Jun 2022 19:07:01 -0000 On Wed, Jun 1, 2022 at 1:16 PM Kay Diederichs wrote: > If -g is used, the executable _always_ has version and option info Well, isn't that the answer to your question then? As an alternative approach, make a command-line option (say, "-v") that prints the version number of the program, name of the author and other pertinent information, as well as the output of compiler_version() and compiler_options(), and then exits. That would ensure that those calls won't be optimized away. -- Janne Blomqvist