public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2874] nvptx: Introduce dummy multilib option for default '-misa=sm_30'
@ 2022-09-26 14:12 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-09-26 14:12 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4d94582e0dcbf5fed9d61213715bfff877bf5ecf

commit r13-2874-g4d94582e0dcbf5fed9d61213715bfff877bf5ecf
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat Jun 11 12:28:36 2022 +0200

    nvptx: Introduce dummy multilib option for default '-misa=sm_30'
    
    ... primarily in preparation for later changes.
    
            gcc/
            * config.gcc (TM_MULTILIB_CONFIG) [nvptx]: Set to '$with_arch'.
            * config/nvptx/t-nvptx (MULTILIB_OPTIONS, MULTILIB_MATCHES)
            (MULTILIB_EXCEPTIONS): Handle it.

Diff:
---
 gcc/config.gcc           |  1 +
 gcc/config/nvptx/t-nvptx | 20 +++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6a47661e647..d130f49699d 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5298,6 +5298,7 @@ case "${target}" in
 
 	nvptx-*)
 		supported_defaults=arch
+		TM_MULTILIB_CONFIG=$with_arch
 		case $with_arch in
 			sm_30 )
 				# OK; default.
diff --git a/gcc/config/nvptx/t-nvptx b/gcc/config/nvptx/t-nvptx
index 2b68149ed7e..c797d57690f 100644
--- a/gcc/config/nvptx/t-nvptx
+++ b/gcc/config/nvptx/t-nvptx
@@ -31,4 +31,22 @@ s-nvptx-gen-opt: $(srcdir)/config/nvptx/nvptx-sm.def \
 	  tmp-nvptx-gen.opt $(srcdir)/config/nvptx/nvptx-gen.opt
 	$(STAMP) s-nvptx-gen-opt
 
-MULTILIB_OPTIONS = mgomp mptx=3.1
+
+# Multilib setup.
+
+MULTILIB_OPTIONS =
+MULTILIB_MATCHES =
+MULTILIB_EXCEPTIONS =
+
+MULTILIB_OPTIONS += mgomp
+
+multilib_options_isa_list := $(TM_MULTILIB_CONFIG)
+multilib_options_isa_default := $(word 1,$(multilib_options_isa_list))
+# Add the default '-misa' as a multilib option:
+MULTILIB_OPTIONS += misa=$(multilib_options_isa_default)
+# ..., but don't handle it specially (remap to default):
+MULTILIB_MATCHES += .=misa?$(multilib_options_isa_default)
+# ..., and don't actually build it:
+MULTILIB_EXCEPTIONS += *misa=$(multilib_options_isa_default)*
+
+MULTILIB_OPTIONS += mptx=3.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-26 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 14:12 [gcc r13-2874] nvptx: Introduce dummy multilib option for default '-misa=sm_30' Thomas Schwinge

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).