From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 33A94385842C for ; Wed, 14 Jun 2023 10:13:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33A94385842C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,242,1681200000"; d="scan'208";a="9827950" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 14 Jun 2023 02:13:24 -0800 IronPort-SDR: LbYPezclBme0Q+qmgziWOSdL0CS3vaz6Uw45PJSRRz5inL9eItK73RCF7bdqjYcLcn1voBcIKz fSL6QY/eijA4uQlMLic62m2KwRL1yJjp8Wr3y8Ssz4SmlhWz7KD2P4gAzpIoH3DqqHa/YgU51b T0OiEmVtzD4i0xAmD2Tm3GRzgo6jX/0HsW7CNkVdc5QwkdyrEnX/fAoV95riwPfa4GtyRUtmtm uo/H9LnzXmRzByLZx+/pMs0wVr/DODQnD2vwtP+yPC3ZEUZADVP7OsuknI+wfJomunPuS5vBO1 bi4= Message-ID: <67429326-c3cc-be9f-8631-66ca95025a67@codesourcery.com> Date: Wed, 14 Jun 2023 12:13:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [ping] driver: Forward '-lgfortran', '-lm' to offloading compilation Content-Language: en-US To: Thomas Schwinge , , Joseph Myers , Jakub Jelinek References: <878rcyqeoh.fsf@euler.schwinge.homeip.net> <87r0qf7ibj.fsf@euler.schwinge.homeip.net> From: Tobias Burnus In-Reply-To: <87r0qf7ibj.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 13.06.23 12:44, Thomas Schwinge wrote: > On 2023-06-05T14:25:18+0200, I wrote: >> OK to push the attached >> "driver: Forward '-lgfortran', '-lm' to offloading compilation"? >> (We didn't have a PR open for that, or did we?) (It was approved by Joseph and pushed by Thomas as r14-1807-g4bcb46b3ade179= ) I wonder whether we should do for the example: --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2720 +2720 @@ Typical command lines are --foffload-options=3Damdgcn-amdhsa=3D-march=3Dgfx906 -foffload-options=3D-O= 3 +-foffload-options=3Damdgcn-amdhsa=3D-march=3Dgfx906 To my knowledge the merge_flto_options is also run for code only doing offloading - such that a host-side -O2 still ends up as -O2 for the offload= ing compiler. Thus, adding -foffload-options=3D-O3 encourages bad practice, at least kind= of. Thoughts? BTW: I think the changed linking behavior should be document in the release notes and in the wiki, i.e. https://gcc.gnu.org/gcc-14/changes.html and https://gcc.gnu.org/wiki/Offloading (anywhere else?) Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955