]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Always add -msoft-float to avoid compiler generating float arithmetics.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:37:08 +0000 (20:37 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:37:08 +0000 (20:37 +0100)
configure.ac

index fdddbaddc085996474866f45074599646f1ee8f3..b734dd0ba00f83deb5ec27f0b4353b1cbb56afe3 100644 (file)
@@ -671,6 +671,12 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p
   TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
 fi
 
+# GRUB doesn't use float or doubles at all. Yet some toolchains may decide
+# that floats are a good fit to run instead of what's written in the code.
+# Given that floating point unit is disabled (if present to begin with)
+# when GRUB is running which may result in various hard crashes.
+TARGET_CFLAGS="$TARGET_CFLAGS -msoft-float"
+
 # By default, GCC 4.4 generates .eh_frame sections containing unwind
 # information in some cases where it previously did not. GRUB doesn't need
 # these and they just use up vital space. Restore the old compiler