public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Richard Biener <rguenther@suse.de>,
	 Matthias Klose <doko@ubuntu.com>
Subject: Re: [Patch] offload-defaulted: Config option to silently ignore uninstalled offload compilers
Date: Wed, 28 Apr 2021 16:05:27 +0200	[thread overview]
Message-ID: <20210428140527.GR1179226@tucnak> (raw)
In-Reply-To: <15f34348-0053-2f31-0603-fd0eefa33897@codesourcery.com>

On Tue, Apr 27, 2021 at 12:22:44PM +0200, Tobias Burnus wrote:
> If configured with --enable-offload-defaulted, configured but not installed
> offload compilers and libgomp plugins are silently ignored.  Useful for
> distribution compilers where those are in separate optional packages.
> 
> 2021-04-27  Jakub Jelinek  <jakub@redhat.com>
> 	    Tobias Burnus  <tobias@codesourcery.com>
> 
> ChangeLog:
> 
> 	* configure.ac (--enable-offload-defaulted): New.
> 	* configure: Regenerate.
> 
> gcc/ChangeLog:
> 
> 	* configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted.
> 	* gcc.c (process_command): New variable.
> 	(driver::maybe_putenv_OFFLOAD_TARGETS): If OFFLOAD_DEFAULTED,
> 	set it if -foffload is defaulted.
> 	* lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
> 	(compile_offload_image): If OFFLOAD_DEFAULTED and
> 	OFFLOAD_TARGET_DEFAULT is in the environment, don't fail
> 	if corresponding mkoffload can't be found.
> 	(compile_images_for_offload_targets): Likewise.  Free and clear
> 	offload_names if no valid offload is found.
> 	* config.in: Regenerate.
> 	* configure: Regenerate.
> 
> libgomp/ChangeLog:
> 
> 	* configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted.
> 	* target.c (gomp_load_plugin_for_device): If set and if a plugin
> 	can't be dlopened, silently assume it has no devices.
> 	* Makefile.in: Regenerate.
> 	* config.h.in: Regenerate.
> 	* configure: Regenerate.
> 
> lto-plugin/ChangeLog:
> 
> 	* Makefile.in: Regenerate.
> 	* configure: Regenerate.
> 
> zlib/ChangeLog:
> 
> 	* configure: Regenerate.

I would probably not regenerate configure/Makefiles that haven't been
touched, so lto-plugin/* and zlib/* above.

Otherwise LGTM.

	Jakub


  reply	other threads:[~2021-04-28 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 10:22 Tobias Burnus
2021-04-28 14:05 ` Jakub Jelinek [this message]
2021-04-28 14:13 ` Matthias Klose
2021-04-28 16:56   ` Tobias Burnus
2021-04-28 16:59     ` Matthias Klose
2021-04-28 17:02     ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428140527.GR1179226@tucnak \
    --to=jakub@redhat.com \
    --cc=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).