This is yet another bug just like PR target/52610, we need to pass -Av8 to the assembler for every cpu type that will use MASK_V8 in sparc.c:sparc_option_override().
I found this while testing GMP builds. I'd like to check this into the various gcc-4_X-branch branches as well, unless there are major objections. gcc/ * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=supersparc or -mcpu=hypersparc. diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 6b02b45..c6122c1 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -327,6 +327,8 @@ extern enum cmodel sparc_cmodel; %{mcpu=sparclite86x:-Asparclite} \ %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \ %{mcpu=v8:-Av8} \ +%{mcpu=supersparc:-Av8} \ +%{mcpu=hypersparc:-Av8} \ %{mcpu=leon:-Av8} \ %{mv8plus:-Av8plus} \ %{mcpu=v9:-Av9} \