GNOME Bugzilla – Bug 512799
libgames-support fails to build on arm
Last modified: 2008-01-29 20:50:19 UTC
It is currently impossible to build libgames-support on arm, because of the sizeof (Card) == sizeof (guint8) in games-card-common.h.
Created attachment 103959 [details] [review] Fix for gnome-games 2.20.3 Here is a working fix for 2.20 using __attribute__ ((packed)). In trunk, it needs to be applied to games-card.h instead.
What's causing this? The bitfields, or the union? Does that compiler not support bitfields? Is the ((packed)) attribute available on all gcc compiler versions >= 2.95 ?
(In reply to comment #2) > What's causing this? The bitfields, or the union? According to the tests, the packed attribute is required for both. > Does that compiler not support bitfields? It does, but (quoting Sam Hocevar) “You need to set __attribute__ ((packed)), otherwise you have a guarantee on the number of representative bits, but not on compacity.” > Is the ((packed)) attribute available on all gcc compiler versions >= 2.95 ? I haven’t tried, but it is present in the GCC 2.95.4 documentation.
* games-card.h: Use __attribute__((__packed__)) for the Card struct. Bug #512799.