===================================================================
@@ -3346,6 +3346,9 @@ if test x$with_cpu = x ; then
;;
esac
;;
+ visium-*-*)
+ with_cpu=gr5
+ ;;
esac
# Avoid overriding --with-cpu-32 and --with-cpu-64 values.
@@ -4295,6 +4298,16 @@ case "${target}" in
;;
esac
;;
+ visium-*-*)
+ supported_defaults="cpu"
+ case $with_cpu in
+ "" | gr5 | gr6)
+ ;;
+ *) echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
esac
# Set some miscellaneous flags for particular targets.
@@ -4449,6 +4462,9 @@ case ${target} in
;;
esac
;;
+ visium-*-*)
+ target_cpu_default2="TARGET_CPU_$with_cpu"
+ ;;
esac
t=
===================================================================
@@ -1735,3 +1735,19 @@ extern int visium_indent_opcode;
visium_indent_opcode = 0; \
} \
} while (0)
+
+/* Configure-time default values for common options. */
+#define OPTION_DEFAULT_SPECS { "cpu", "%{!mcpu=*:-mcpu=%(VALUE)}" }
+
+/* Values of TARGET_CPU_DEFAULT specified via --with-cpu. */
+#define TARGET_CPU_gr5 0
+#define TARGET_CPU_gr6 1
+
+/* Default -mcpu multilib for above values. */
+#if TARGET_CPU_DEFAULT == TARGET_CPU_gr5
+#define MULTILIB_DEFAULTS { "mcpu=gr5" }
+#elif TARGET_CPU_DEFAULT == TARGET_CPU_gr6
+#define MULTILIB_DEFAULTS { "mcpu=gr6" }
+#else
+#error Unrecognized value in TARGET_CPU_DEFAULT
+#endif
===================================================================
@@ -17,5 +17,7 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-MULTILIB_OPTIONS = mcpu=gr6
-MULTILIB_DIRNAMES = gr6
+# The compiler defaults to -mcpu=gr5 but this may be overridden via --with-cpu
+# at configure time so the -mcpu setting must be symmetrical.
+MULTILIB_OPTIONS = mcpu=gr5/mcpu=gr6
+MULTILIB_DIRNAMES = gr5 gr6