summaryrefslogtreecommitdiffstats
path: root/meta-emenlow
diff options
context:
space:
mode:
authorChristopher Hallinan <challinan@gmail.com>2012-05-22 02:56:43 (GMT)
committerTom Zanussi <tom.zanussi@intel.com>2012-05-22 14:37:40 (GMT)
commita06f5d308803ab2c2c783489093626ac85bf9a60 (patch)
tree6d53dbdf25a68cb4da7a53b4767e2b8d099b4ffb /meta-emenlow
parent7c1086df3f92d76ca1a062f9b4b1daf6823bfb63 (diff)
downloadmeta-intel-a06f5d308803ab2c2c783489093626ac85bf9a60.tar.gz
xserver-psb: fix X server on emenlow when built with gcc 4.7.x
Note: this patch has already been submitted against other BSPs, originally submitted to oe-core by Gary Thomas. I ran into this same issue building MACHINE=emenlow on my own Z530 platform. There are likely others as well where this needs to be applied. Upstream is here: https://bugs.freedesktop.org/show_bug.cgi?id=18451 PR has been bumped. Signed-off-by: Christopher Hallinan <challinan@gmail.com> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Diffstat (limited to 'meta-emenlow')
-rw-r--r--meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch211
-rw-r--r--meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb-1.7.99.2.inc5
2 files changed, 214 insertions, 2 deletions
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch
new file mode 100644
index 0000000..cb937b0
--- /dev/null
+++ b/meta-emenlow/recipes-graphics/xorg-xserver/files/fix-bogus-stack-variables.patch
@@ -0,0 +1,211 @@
1Upstream is here:
2https://bugs.freedesktop.org/show_bug.cgi?id=18451
3
4Upstream-status: Backport
5
6Signed-off-by: Christopher Hallinan <challinan (a] gmail.com>
7
8diff --git a/Xext/xace.c b/Xext/xace.c
9index e10d837..c757cad 100644
10--- a/Xext/xace.c
11+++ b/Xext/xace.c
12@@ -87,7 +87,18 @@ void XaceHookAuditEnd(ClientPtr ptr, int result)
13 */
14 int XaceHook(int hook, ...)
15 {
16- pointer calldata; /* data passed to callback */
17+ union {
18+ XaceResourceAccessRec res;
19+ XaceDeviceAccessRec dev;
20+ XaceSendAccessRec send;
21+ XaceReceiveAccessRec recv;
22+ XaceClientAccessRec client;
23+ XaceExtAccessRec ext;
24+ XaceServerAccessRec server;
25+ XaceScreenAccessRec screen;
26+ XaceAuthAvailRec auth;
27+ XaceKeyAvailRec key;
28+ } u;
29 int *prv = NULL; /* points to return value from callback */
30 va_list ap; /* argument list */
31 va_start(ap, hook);
32@@ -99,117 +110,86 @@ int XaceHook(int hook, ...)
33 */
34 switch (hook)
35 {
36- case XACE_RESOURCE_ACCESS: {
37- XaceResourceAccessRec rec;
38- rec.client = va_arg(ap, ClientPtr);
39- rec.id = va_arg(ap, XID);
40- rec.rtype = va_arg(ap, RESTYPE);
41- rec.res = va_arg(ap, pointer);
42- rec.ptype = va_arg(ap, RESTYPE);
43- rec.parent = va_arg(ap, pointer);
44- rec.access_mode = va_arg(ap, Mask);
45- rec.status = Success; /* default allow */
46- calldata = &rec;
47- prv = &rec.status;
48+ case XACE_RESOURCE_ACCESS:
49+ u.res.client = va_arg(ap, ClientPtr);
50+ u.res.id = va_arg(ap, XID);
51+ u.res.rtype = va_arg(ap, RESTYPE);
52+ u.res.res = va_arg(ap, pointer);
53+ u.res.ptype = va_arg(ap, RESTYPE);
54+ u.res.parent = va_arg(ap, pointer);
55+ u.res.access_mode = va_arg(ap, Mask);
56+ u.res.status = Success; /* default allow */
57+ prv = &u.res.status;
58 break;
59- }
60- case XACE_DEVICE_ACCESS: {
61- XaceDeviceAccessRec rec;
62- rec.client = va_arg(ap, ClientPtr);
63- rec.dev = va_arg(ap, DeviceIntPtr);
64- rec.access_mode = va_arg(ap, Mask);
65- rec.status = Success; /* default allow */
66- calldata = &rec;
67- prv = &rec.status;
68+ case XACE_DEVICE_ACCESS:
69+ u.dev.client = va_arg(ap, ClientPtr);
70+ u.dev.dev = va_arg(ap, DeviceIntPtr);
71+ u.dev.access_mode = va_arg(ap, Mask);
72+ u.dev.status = Success; /* default allow */
73+ prv = &u.dev.status;
74 break;
75- }
76- case XACE_SEND_ACCESS: {
77- XaceSendAccessRec rec;
78- rec.client = va_arg(ap, ClientPtr);
79- rec.dev = va_arg(ap, DeviceIntPtr);
80- rec.pWin = va_arg(ap, WindowPtr);
81- rec.events = va_arg(ap, xEventPtr);
82- rec.count = va_arg(ap, int);
83- rec.status = Success; /* default allow */
84- calldata = &rec;
85- prv = &rec.status;
86+ case XACE_SEND_ACCESS:
87+ u.send.client = va_arg(ap, ClientPtr);
88+ u.send.dev = va_arg(ap, DeviceIntPtr);
89+ u.send.pWin = va_arg(ap, WindowPtr);
90+ u.send.events = va_arg(ap, xEventPtr);
91+ u.send.count = va_arg(ap, int);
92+ u.send.status = Success; /* default allow */
93+ prv = &u.send.status;
94 break;
95- }
96- case XACE_RECEIVE_ACCESS: {
97- XaceReceiveAccessRec rec;
98- rec.client = va_arg(ap, ClientPtr);
99- rec.pWin = va_arg(ap, WindowPtr);
100- rec.events = va_arg(ap, xEventPtr);
101- rec.count = va_arg(ap, int);
102- rec.status = Success; /* default allow */
103- calldata = &rec;
104- prv = &rec.status;
105+ case XACE_RECEIVE_ACCESS:
106+ u.recv.client = va_arg(ap, ClientPtr);
107+ u.recv.pWin = va_arg(ap, WindowPtr);
108+ u.recv.events = va_arg(ap, xEventPtr);
109+ u.recv.count = va_arg(ap, int);
110+ u.recv.status = Success; /* default allow */
111+ prv = &u.recv.status;
112 break;
113- }
114- case XACE_CLIENT_ACCESS: {
115- XaceClientAccessRec rec;
116- rec.client = va_arg(ap, ClientPtr);
117- rec.target = va_arg(ap, ClientPtr);
118- rec.access_mode = va_arg(ap, Mask);
119- rec.status = Success; /* default allow */
120- calldata = &rec;
121- prv = &rec.status;
122+ case XACE_CLIENT_ACCESS:
123+ u.client.client = va_arg(ap, ClientPtr);
124+ u.client.target = va_arg(ap, ClientPtr);
125+ u.client.access_mode = va_arg(ap, Mask);
126+ u.client.status = Success; /* default allow */
127+ prv = &u.client.status;
128 break;
129- }
130- case XACE_EXT_ACCESS: {
131- XaceExtAccessRec rec;
132- rec.client = va_arg(ap, ClientPtr);
133- rec.ext = va_arg(ap, ExtensionEntry*);
134- rec.access_mode = DixGetAttrAccess;
135- rec.status = Success; /* default allow */
136- calldata = &rec;
137- prv = &rec.status;
138+ case XACE_EXT_ACCESS:
139+ u.ext.client = va_arg(ap, ClientPtr);
140+ u.ext.ext = va_arg(ap, ExtensionEntry*);
141+ u.ext.access_mode = DixGetAttrAccess;
142+ u.ext.status = Success; /* default allow */
143+ prv = &u.ext.status;
144 break;
145- }
146- case XACE_SERVER_ACCESS: {
147- XaceServerAccessRec rec;
148- rec.client = va_arg(ap, ClientPtr);
149- rec.access_mode = va_arg(ap, Mask);
150- rec.status = Success; /* default allow */
151- calldata = &rec;
152- prv = &rec.status;
153+ case XACE_SERVER_ACCESS:
154+ u.server.client = va_arg(ap, ClientPtr);
155+ u.server.access_mode = va_arg(ap, Mask);
156+ u.server.status = Success; /* default allow */
157+ prv = &u.server.status;
158 break;
159- }
160 case XACE_SCREEN_ACCESS:
161- case XACE_SCREENSAVER_ACCESS: {
162- XaceScreenAccessRec rec;
163- rec.client = va_arg(ap, ClientPtr);
164- rec.screen = va_arg(ap, ScreenPtr);
165- rec.access_mode = va_arg(ap, Mask);
166- rec.status = Success; /* default allow */
167- calldata = &rec;
168- prv = &rec.status;
169+ case XACE_SCREENSAVER_ACCESS:
170+ u.screen.client = va_arg(ap, ClientPtr);
171+ u.screen.screen = va_arg(ap, ScreenPtr);
172+ u.screen.access_mode = va_arg(ap, Mask);
173+ u.screen.status = Success; /* default allow */
174+ prv = &u.screen.status;
175 break;
176- }
177- case XACE_AUTH_AVAIL: {
178- XaceAuthAvailRec rec;
179- rec.client = va_arg(ap, ClientPtr);
180- rec.authId = va_arg(ap, XID);
181- calldata = &rec;
182+ case XACE_AUTH_AVAIL:
183+ u.auth.client = va_arg(ap, ClientPtr);
184+ u.auth.authId = va_arg(ap, XID);
185 break;
186- }
187- case XACE_KEY_AVAIL: {
188- XaceKeyAvailRec rec;
189- rec.event = va_arg(ap, xEventPtr);
190- rec.keybd = va_arg(ap, DeviceIntPtr);
191- rec.count = va_arg(ap, int);
192- calldata = &rec;
193+ case XACE_KEY_AVAIL:
194+ u.key.event = va_arg(ap, xEventPtr);
195+ u.key.keybd = va_arg(ap, DeviceIntPtr);
196+ u.key.count = va_arg(ap, int);
197 break;
198- }
199- default: {
200+ default:
201 va_end(ap);
202 return 0; /* unimplemented hook number */
203- }
204 }
205 va_end(ap);
206
207 /* call callbacks and return result, if any. */
208- CallCallbacks(&XaceHooks[hook], calldata);
209+ CallCallbacks(&XaceHooks[hook], &u);
210 return prv ? *prv : Success;
211 }
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb-1.7.99.2.inc b/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb-1.7.99.2.inc
index 9ee9c97..1fe962b 100644
--- a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb-1.7.99.2.inc
+++ b/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb-1.7.99.2.inc
@@ -1,4 +1,4 @@
1PR = "r5" 1PR = "r6"
2 2
3PROTO_DEPS += "xf86driproto dri2proto" 3PROTO_DEPS += "xf86driproto dri2proto"
4 4
@@ -8,7 +8,8 @@ SRC_URI += "file://nodolt.patch \
8 file://crosscompile.patch \ 8 file://crosscompile.patch \
9 file://libdrm-poulsbo.patch \ 9 file://libdrm-poulsbo.patch \
10 file://werror-address-fix.patch \ 10 file://werror-address-fix.patch \
11 file://ptr-to-int-cast-fix.patch" 11 file://ptr-to-int-cast-fix.patch \
12 file://fix-bogus-stack-variables.patch"
12 13
13# Misc build failure for master HEAD 14# Misc build failure for master HEAD
14SRC_URI += "file://fix_open_max_preprocessor_error.patch" 15SRC_URI += "file://fix_open_max_preprocessor_error.patch"