]> 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:03:36 +0000 (16:03 +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.

gcc/config.gcc
gcc/config/nvptx/t-nvptx

index 6a47661e647ff1aa71ddbd05e9685ff53fc139bc..d130f49699dcd102bc65d33d611a513e9369ea71 100644 (file)
@@ -5298,6 +5298,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