Blame SOURCES/0395-configure.ac-Use-mcmodel-large-on-x86_64-emu-as-well.patch

f96e0b
From 0ac44e6aa6e42da168eac6595cdb439b343a8a22 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Mon, 29 Apr 2013 19:14:46 +0200
f96e0b
Subject: [PATCH 395/482] 	* configure.ac: Use -mcmodel=large on
f96e0b
 x86_64-emu as well. 	Reported by: qwertial.
f96e0b
f96e0b
---
f96e0b
 ChangeLog    | 5 +++++
f96e0b
 configure.ac | 4 +++-
f96e0b
 2 files changed, 8 insertions(+), 1 deletion(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 0e6d38a..0485a01 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,8 @@
f96e0b
+2013-04-29  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
+	* configure.ac: Use -mcmodel=large on x86_64-emu as well.
f96e0b
+	Reported by: qwertial.
f96e0b
+
f96e0b
 2013-04-29  Vladimir Testov <vladimir.testov@rosalab.ru>
f96e0b
 
f96e0b
 	* grub-core/gfxmenu/circular_progress.c: Set start_angle in degrees
f96e0b
diff --git a/configure.ac b/configure.ac
f96e0b
index 5ff7f25..00540e6 100644
f96e0b
--- a/configure.ac
f96e0b
+++ b/configure.ac
f96e0b
@@ -605,7 +605,7 @@ if test "x$target_m64" = x1; then
f96e0b
   TARGET_MODULE_FORMAT="elf64"
f96e0b
 fi
f96e0b
 
f96e0b
-if test "$target_cpu"-"$platform" = x86_64-efi; then
f96e0b
+if test "$target_cpu" = x86_64; then
f96e0b
   # Use large model to support 4G memory
f96e0b
   AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
f96e0b
     SAVED_CFLAGS=$CFLAGS
f96e0b
@@ -619,7 +619,9 @@ if test "$target_cpu"-"$platform" = x86_64-efi; then
f96e0b
   else
f96e0b
     TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
f96e0b
   fi
f96e0b
+fi
f96e0b
 
f96e0b
+if test "$target_cpu"-"$platform" = x86_64-efi; then
f96e0b
   # EFI writes to stack below %rsp, we must not use the red zone
f96e0b
   AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [
f96e0b
     CFLAGS="$CFLAGS -m64 -mno-red-zone"
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b