From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from einhorn-mail-out.in-berlin.de (einhorn-mail-out.in-berlin.de [217.197.80.21]) by sourceware.org (Postfix) with ESMTPS id B154B3857000 for ; Wed, 28 Apr 2021 14:13:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B154B3857000 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ubuntu.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=doko@ubuntu.com X-Envelope-From: doko@ubuntu.com Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 13SEDmcn005032 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 28 Apr 2021 16:13:48 +0200 Subject: Re: [Patch] offload-defaulted: Config option to silently ignore uninstalled offload compilers To: Tobias Burnus , gcc-patches , Jakub Jelinek , Richard Biener References: <15f34348-0053-2f31-0603-fd0eefa33897@codesourcery.com> From: Matthias Klose Message-ID: <251870a9-85e8-b69b-2f94-841f7548c3ba@ubuntu.com> Date: Wed, 28 Apr 2021 16:13:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <15f34348-0053-2f31-0603-fd0eefa33897@codesourcery.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 14:13:55 -0000 On 4/27/21 12:22 PM, Tobias Burnus wrote: > This is based on Jakub's patch* which is used with many distributions – and is has > to be maintained by all of them; otherwise issues like lp #1878760 might creep in, > as discussed in #gcc yesterday. - As I am a huge fan of reducing code duplication > and local patches, I propose to add it to GCC proper behind a configure flag. > > The patch idea is: offloading support is configured for one or multiple offload > devices > but compilation silently ignores a target if its offload compiler is not found at > compile time and also dlopen errors of the associated libgomp plugin is also > silently ignored such that also the system where the program is run do not show > a run-time error. > > This makes a lot of sense for distribution compilers – as it permits to configure > GCC to support offloading to one/multiple offload targets, but the actual > offload compiler and the run-time support can be put into separate, optional > packages. > > (When -foffload=$TARGET is specified explicitly, it still gives > an error if the offload compiler is not installed; this does not not affect the > libgomp/run-time side.) > > However, for nondistro builds, compilers are usually installed "as is" and not > split into different packages – thus, compilation or run-time issues should give > an error. > > Hence, the distro behaviour is only active when configured with > --enable-offload-defaulted. > > Comments? OK for mainline? please document that option in gcc/doc/install.texi. Matthias