Ensure that -mno-unaligned-access or some equivalent option is used.

This commit is contained in:
Vladimir Serbinenko 2013-11-30 11:31:14 +01:00
parent 35de6d4bac
commit d74b9a1d1a
3 changed files with 23 additions and 24 deletions

View file

@ -474,23 +474,3 @@ dnl program.
AC_DEFUN([grub_TRANSFORM],[dnl
AC_SUBST(AS_TR_SH([$1]), [`AS_ECHO([$1]) | sed "$program_transform_name"`])dnl
])
dnl Check if the C compiler supports `-mno-unaligned-access'.
AC_DEFUN([grub_CHECK_NO_UNALIGNED_ACCESS],[
[# foobar
nua_possible=yes]
AC_MSG_CHECKING([whether `$CC' supports `-mno-unaligned-access'])
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
int main() {
return 0;
}
]])])
[if eval "$ac_compile -S -mno-unaligned-access -o conftest.s" 2> /dev/null; then]
AC_MSG_RESULT([yes])
[rm -f conftest.s
else
nua_possible=no]
AC_MSG_RESULT([no])
[fi]
])