* configure.ac: Add -freg-struct-return on all platforms that
support it.
This commit is contained in:
parent
b35ec29927
commit
cdc17f60dc
3 changed files with 20 additions and 4 deletions
11
configure.ac
11
configure.ac
|
@ -499,6 +499,17 @@ if test "x$target_cpu" = xi386; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether -freg-struct-return works], [grub_cv_cc_freg_struct_return], [
|
||||
CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_freg_struct_return=yes],
|
||||
[grub_cv_cc_freg_struct_return=no])
|
||||
])
|
||||
|
||||
if test "x$grub_cv_cc_freg_struct_return" = xyes; then
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -freg-struct-return"
|
||||
fi
|
||||
|
||||
if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
|
||||
# Some toolchains enable these features by default, but they need
|
||||
# registers that aren't set up properly in GRUB.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue