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:
parent
f501677cb2
commit
7e9ca17ace
7 changed files with 102 additions and 10 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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.
|
||||
|
||||
2009-03-03 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
Move more components to the relocation area, and fix mbi pointer
|
||||
|
|
1
DISTLIST
1
DISTLIST
|
@ -61,7 +61,6 @@ commands/read.c
|
|||
commands/reboot.c
|
||||
commands/search.c
|
||||
commands/sleep.c
|
||||
commands/terminal.c
|
||||
commands/test.c
|
||||
commands/usbtest.c
|
||||
commands/videotest.c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* handler.c - test module for dynamic loading */
|
||||
/* handler.c - commands to list or select handlers */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
|
71
configure
vendored
71
configure
vendored
|
@ -6774,6 +6774,12 @@ 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
|
||||
{ echo "$as_me:$LINENO: checking whether option -mcmodel=large works" >&5
|
||||
echo $ECHO_N "checking whether option -mcmodel=large works... $ECHO_C" >&6; }
|
||||
if test "${grub_cv_cc_mcmodel+set}" = set; then
|
||||
|
@ -6826,13 +6832,72 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||
fi
|
||||
{ echo "$as_me:$LINENO: result: $grub_cv_cc_mcmodel" >&5
|
||||
echo "${ECHO_T}$grub_cv_cc_mcmodel" >&6; }
|
||||
if test "x$grub_cv_cc_mcmodel" = xno; then
|
||||
if test "x$grub_cv_cc_no_mcmodel" = xno; then
|
||||
{ { echo "$as_me:$LINENO: error: -mcmodel=large not supported, upgrade your gcc" >&5
|
||||
echo "$as_me: error: -mcmodel=large not supported, upgrade your gcc" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
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
|
||||
{ echo "$as_me:$LINENO: checking whether option -mno-red-zone works" >&5
|
||||
echo $ECHO_N "checking whether option -mno-red-zone works... $ECHO_C" >&6; }
|
||||
if test "${grub_cv_cc_no_red_zone+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
CFLAGS="-m64 -mno-red-zone"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (ac_try="$ac_compile"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_compile") 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest.$ac_objext; then
|
||||
grub_cv_cc_no_red_zone=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
grub_cv_cc_no_red_zone=no
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $grub_cv_cc_no_red_zone" >&5
|
||||
echo "${ECHO_T}$grub_cv_cc_no_red_zone" >&6; }
|
||||
if test "x$grub_cv_cc_no_red_zone" = xno; then
|
||||
{ { echo "$as_me:$LINENO: error: -mno-red-zone not supported, upgrade your gcc" >&5
|
||||
echo "$as_me: error: -mno-red-zone not supported, upgrade your gcc" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large -mno-red-zone"
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
23
configure.ac
23
configure.ac
|
@ -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
|
||||
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* handler.c - grub handler function*/
|
||||
/* handler.c - grub handler function */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* list.c - grub list function*/
|
||||
/* list.c - grub list function */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
|
Loading…
Reference in a new issue