Add -mno-stack-arg-probe on mingw.
This argument disables generation of calls to __chkstk_ms. Those calls are useless on GRUB as function is dummy. Yet they increase module size and use limited-range relocations which may not work under some memory layouts. We currently don't use such layouts on concerned platforms but lt's correct this.
This commit is contained in:
parent
68e158dffd
commit
f1b3525385
1 changed files with 12 additions and 0 deletions
12
configure.ac
12
configure.ac
|
@ -910,6 +910,18 @@ if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xy
|
|||
TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether -mno-stack-arg-probe works], [grub_cv_cc_mno_stack_arg_probe], [
|
||||
CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_mno_stack_arg_probe=yes],
|
||||
[grub_cv_cc_mno_stack_arg_probe=no])
|
||||
])
|
||||
|
||||
if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
|
||||
fi
|
||||
|
||||
|
||||
# By default, GCC 4.6 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
|
||||
|
|
Loading…
Reference in a new issue