]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
riscv: fix cross compiler
authorMartin Liska <mliska@suse.cz>
Tue, 25 Oct 2022 04:58:17 +0000 (06:58 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 25 Oct 2022 05:14:09 +0000 (07:14 +0200)
Move riscv_get_valid_option_values out of

Fixes:
riscv/riscv-common.cc:1748:40: error: ‘riscv_get_valid_option_values’ was not declared in this scope

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc
  (riscv_get_valid_option_values): Get out of ifdef.

gcc/common/config/riscv/riscv-common.cc

index 697bfe435c8b436cc3df7fc1379079178eb2387f..dead3802f83c57d3ffe430968b766fba2460f754 100644 (file)
@@ -1691,6 +1691,10 @@ riscv_compute_multilib (
     return xstrdup (multilib_infos[best_match_multi_lib].path.c_str ());
 }
 
+#undef TARGET_COMPUTE_MULTILIB
+#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib
+#endif
+
 vec<const char *>
 riscv_get_valid_option_values (int option_code,
                               const char *prefix ATTRIBUTE_UNUSED)
@@ -1726,10 +1730,6 @@ riscv_get_valid_option_values (int option_code,
   return v;
 }
 
-#undef TARGET_COMPUTE_MULTILIB
-#define TARGET_COMPUTE_MULTILIB riscv_compute_multilib
-#endif
-
 /* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
 static const struct default_options riscv_option_optimization_table[] =
   {