The target option misa has the following description:
...
$ gcc --target-help 2>&1 | grep misa
-misa= Specify the PTX ISA target architecture to use.
...
The name misa is somewhat poorly chosen. It suggests that for a use
-misa=sm_30, sm_30 is the name of a specific Instruction Set Architecture.
Instead, sm_30 is the name of a specific target architecture in the generic
PTX Instruction Set Architecture.
Futhermore, there's mptx, which also has ISA in the description:
...
-mptx= Specify the PTX ISA version to use.
...
Add the more intuitive alias march for misa:
...
$ gcc --target-help 2>&1 | grep march
-march= Alias: Same as -misa=.
...
Tested on nvptx.
gcc/ChangeLog:
2022-03-29 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.opt (march): Add alias of misa.
gcc/testsuite/ChangeLog:
2022-03-29 Tom de Vries <tdevries@suse.de>
* gcc.target/nvptx/main.c: New test.
* gcc.target/nvptx/march.c: New test.
Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option) Init(PTX_ISA_SM30)
Specify the PTX ISA target architecture to use.
+march=
+Target RejectNegative Joined Alias(misa=)
+Alias:
+
Enum
Name(ptx_version) Type(int)
Known PTX ISA versions (for use with the -mptx= option):
--- /dev/null
+/* { dg-do link } */
+
+int
+main (void)
+{
+ return 0;
+}
--- /dev/null
+/* { dg-options "-march=sm_30"} */
+
+#include "main.c"
+
+/* { dg-final { scan-assembler-times "\\.target\tsm_30" 1 } } */