mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
2009-03-04 Bean <bean123ch@gmail.com>
* configure.ac: Only test -mcmodel=large option in x86_64-efi, also add another option -mno-red-zone. * commands/handler.c: Change module description. * kern/handler.c: Add missing space at the end of description line. * kern/list.c: Likewise.
This commit is contained in:
1 parent
f501677cb2
commit
7e9ca17ace
7 files changed
+102
-10
No files matched your search
+20
-3
@@ -299,17 +299,34 @@ fi
|
||||
|
||||
if test "x$target_m64" = x1; then
|
||||
# Force 64-bit mode.
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
||||
fi
|
||||
|
||||
if test "$target_cpu"-"$platform" = x86_64-efi; then
|
||||
# Use large model to support 4G memory
|
||||
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
|
||||
CFLAGS="-m64 -mcmodel=large"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_mcmodel=yes],
|
||||
[grub_cv_cc_mcmodel=no])
|
||||
])
|
||||
if test "x$grub_cv_cc_mcmodel" = xno; then
|
||||
if test "x$grub_cv_cc_no_mcmodel" = xno; then
|
||||
AC_MSG_ERROR([-mcmodel=large not supported, upgrade your gcc])
|
||||
fi
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
||||
|
||||
# EFI writes to stack below %rsp, we must not use the red zone
|
||||
AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [
|
||||
CFLAGS="-m64 -mno-red-zone"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_no_red_zone=yes],
|
||||
[grub_cv_cc_no_red_zone=no])
|
||||
])
|
||||
if test "x$grub_cv_cc_no_red_zone" = xno; then
|
||||
AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc])
|
||||
fi
|
||||
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large -mno-red-zone"
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user