http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33135
--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-07-16 00:18:11 UTC --- (In reply to comment #2) You are right. Our sh_option_override has code like this: if (flag_finite_math_only == 2) flag_finite_math_only = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE; if (TARGET_SH2E && !flag_finite_math_only) target_flags |= MASK_IEEE; Before 4.6, we set flag_finite_math_only to 2 in sh_optimization_options and tried to set it to 2 with sh_option_init_struct in 4.6, though the latter looks failed to work. Thus before 4.6, the 2nd if close in the above code doesn't effect but now MASK_IEEE is set with it. Ugh. I guess that the better default would be -mno-ieee for bare metals and -mieee for linux. Maybe your proposal + removing the above lines and the patch like --- ORIG/trunk/gcc/config/sh/linux.h 2012-03-08 09:57:48.000000000 +0900 +++ trunk/gcc/config/sh/linux.h 2012-07-16 08:59:57.000000000 +0900 @@ -41,7 +41,7 @@ along with GCC; see the file COPYING3. #undef TARGET_DEFAULT #define TARGET_DEFAULT \ - (TARGET_CPU_DEFAULT | MASK_USERMODE | TARGET_ENDIAN_DEFAULT \ + (TARGET_CPU_DEFAULT | MASK_USERMODE | MASK_IEEE | TARGET_ENDIAN_DEFAULT \ | TARGET_OPT_DEFAULT) #define TARGET_ASM_FILE_END file_end_indicate_exec_stack will be reasonable and the most unsurprising way to go.