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

https://gcc.gnu.org/g:74ddd1ec9d8d7b91790962faed0a5e23b5d1bbcb

commit 74ddd1ec9d8d7b91790962faed0a5e23b5d1bbcb
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.
    
    (cherry picked from commit 4d94582e0dcbf5fed9d61213715bfff877bf5ecf)

Diff:
---
 gcc/ChangeLog.omp        |  9 +++++++++
 gcc/config.gcc           |  1 +
 gcc/config/nvptx/t-nvptx | 20 +++++++++++++++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 7f5f932b9d6..43fa05159b6 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,12 @@
+2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>
+
+	Backported from master:
+	2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* config.gcc (TM_MULTILIB_CONFIG) [nvptx]: Set to '$with_arch'.
+	* config/nvptx/t-nvptx (MULTILIB_OPTIONS, MULTILIB_MATCHES)
+	(MULTILIB_EXCEPTIONS): Handle it.
+
 2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>
 
 	Backported from master:
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3b1bde78391..d492b7769fe 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5441,6 +5441,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:21 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:21 [gcc/devel/omp/gcc-12] 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).