diff --git a/src/gcc/config/sh/sh.c b/src/gcc/config/sh/sh.c
index ee80028..9049576 100644
--- a/src/gcc/config/sh/sh.c
+++ b/src/gcc/config/sh/sh.c
@@ -1020,6 +1020,13 @@ sh_option_override (void)
   /* This target defaults to strict volatile bitfields.  */
   if (flag_strict_volatile_bitfields < 0)
     flag_strict_volatile_bitfields = 1;
+
+  /* Enable -mieee option */
+  if (TARGET_SH4 || TARGET_SH4A_ARCH)
+    {
+	  if (!flag_finite_math_only)
+        target_flags |= MASK_IEEE;
+    }
 }
 
 /* Print the operand address in x to the stream.  */
