On Wed, Jan 10, 2007 at 06:21:05PM +0000, Keir Fraser wrote:
> We only care about it working for the x86/64 target since that's the only
> one that asserts CONFIG_COMPAT. Why would wrapping structs individually be
> better than wrapping whole header files?
I've been building with the below, but haven't verified it's correct.
regards
john
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1168532284 28800
# Node ID 30f9b54e54d444fa1f897257b6a35d8caabc8b6e
# Parent cf35b1e695d68c4503784506ee62ceffcff69452
Enforce pragma pack(4) for the compat headers.
Signed-off-by: John Levon <john.levon@xxxxxxx>
diff --git a/xen/include/Makefile b/xen/include/Makefile
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -32,8 +32,8 @@ cppflags-$(CONFIG_X86) += -m32
cppflags-$(CONFIG_X86) += -m32
# 8-byte types are 4-byte aligned on x86_32 ...
-prefix-$(CONFIG_X86) := \#pragma pack(push, 4)
-suffix-$(CONFIG_X86) := \#pragma pack(pop)
+prefix-$(CONFIG_X86) := \#pragma pack(4)
+suffix-$(CONFIG_X86) := \#pragma pack()
endif
diff --git a/xen/tools/compat-build-header.py b/xen/tools/compat-build-header.py
--- a/xen/tools/compat-build-header.py
+++ b/xen/tools/compat-build-header.py
@@ -3,7 +3,7 @@ import re,sys
import re,sys
pats = [
- [ r"__InClUdE__", r"#include" ],
+ [ r"__InClUdE__(.*)", r"#include\1\n#pragma pack(4)" ],
[ r"\"xen-compat.h\"", r"<public/xen-compat.h>" ],
[ r"(struct|union|enum)\s+(xen_?)?(\w)", r"\1 compat_\3" ],
[ r"@KeeP@", r"" ],
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|