31004e6
From 922c5f5bac2699f8fb4273e9e542fc8cb416535a Mon Sep 17 00:00:00 2001
ed8842a
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
ed8842a
Date: Wed, 8 May 2013 11:05:37 +0200
f74b50e
Subject: [PATCH 466/482] 	* conf/Makefile.common: Poison float and
31004e6
 double on non-emu.
ed8842a
ed8842a
---
ed8842a
 ChangeLog            | 4 ++++
ed8842a
 conf/Makefile.common | 5 +++++
ed8842a
 util/import_gcry.py  | 6 ++++++
ed8842a
 3 files changed, 15 insertions(+)
ed8842a
31004e6
diff --git a/ChangeLog b/ChangeLog
31004e6
index 39dc051..0da7177 100644
31004e6
--- a/ChangeLog
31004e6
+++ b/ChangeLog
31004e6
@@ -1,5 +1,9 @@
31004e6
 2013-05-08  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
 
31004e6
+	* conf/Makefile.common: Poison float and double on non-emu.
31004e6
+
31004e6
+2013-05-08  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
+
31004e6
 	* configure.ac: Don't disable extended registers on emu.
31004e6
 
31004e6
 2013-05-07  Vladimir Serbinenko  <phcoder@gmail.com>
ed8842a
diff --git a/conf/Makefile.common b/conf/Makefile.common
ed8842a
index c185a55..ca1cb17 100644
ed8842a
--- a/conf/Makefile.common
ed8842a
+++ b/conf/Makefile.common
ed8842a
@@ -40,6 +40,11 @@ endif
ed8842a
 
ed8842a
 # Other options
ed8842a
 
ed8842a
+if ! COND_emu
ed8842a
+CFLAGS_PLATFORM += -Dfloat=__grub_poision
ed8842a
+CFLAGS_PLATFORM += -Ddouble=__grub_poision
ed8842a
+endif
ed8842a
+
ed8842a
 CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\"
ed8842a
 CPPFLAGS_DEFAULT += -I$(builddir)
ed8842a
 CPPFLAGS_DEFAULT += -I$(srcdir)
ed8842a
diff --git a/util/import_gcry.py b/util/import_gcry.py
ed8842a
index 18f5253..afa8e69 100644
ed8842a
--- a/util/import_gcry.py
ed8842a
+++ b/util/import_gcry.py
ed8842a
@@ -488,6 +488,12 @@ for src in sorted (os.listdir (os.path.join (indir, "src"))):
ed8842a
         fw.close ()
ed8842a
         continue
ed8842a
     f = codecs.open (infile, "r", "utf-8")
ed8842a
+    if src == "types.h":
ed8842a
+        fw.write (f.read ().replace ("float f;", "").replace ("double g;", ""))
ed8842a
+        f.close ()
ed8842a
+        fw.close ()
ed8842a
+        continue
ed8842a
+
ed8842a
     fw.write (f.read ())
ed8842a
     f.close ()
ed8842a
     fw.close ()
ed8842a
-- 
ed8842a
1.8.2.1
ed8842a