]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: Introduce dummy multilib option for default '-misa=sm_30'
authorThomas Schwinge <thomas@codesourcery.com>
Sat, 11 Jun 2022 10:28:36 +0000 (12:28 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Mon, 26 Sep 2022 14:19:26 +0000 (16:19 +0200)
... 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)

gcc/ChangeLog.omp
gcc/config.gcc
gcc/config/nvptx/t-nvptx

index 7f5f932b9d6a2b157130fd38ce0ad50db0839440..43fa05159b62da3b7358ed0b5dc68a924490e2ac 100644 (file)
@@ -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:
index 3b1bde783919179910d835d83c00b50bba199396..d492b7769fe8704f360d26cfddb22d2f159bed68 100644 (file)
@@ -5441,6 +5441,7 @@ case "${target}" in
 
        nvptx-*)
                supported_defaults=arch
+               TM_MULTILIB_CONFIG=$with_arch
                case $with_arch in
                        sm_30 )
                                # OK; default.
index 2b68149ed7e68d0fad7b0de559ea116de559a475..c797d57690f4a355b7a88c4d8700bc9fc9695d0d 100644 (file)
@@ -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