Skip to content

Commit

Permalink
Always add -msoft-float to avoid compiler generating float arithmetics.
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder committed Jan 24, 2015
1 parent b8f5371 commit 3661261
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3661261

Please sign in to comment.