Blame SOURCES/0466-conf-Makefile.common-Poison-float-and-double-on-non-.patch

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