[Scummvm-devel] ScummVM 0.10.0 tagged with tools

Kostas Nakos knakos at phys.uoa.gr
Sun Jul 1 19:47:01 CEST 2007


Lars Persson wrote:
>> From: "John Willis" 
>>> Just to get this straight: Is there a workaround for this? That is,
>>> does using __attribute__((packed)) solve the problem? Does one have
>>> to remove the #pragma pack statements in addition? Or what?
>> The current SVN codebase requires no modifications at all to build and run
>> successfully on the GP2X or WinCE/GCC/ARM (or any ARM GCC target, DS, GP32
>> etc.) without any alignment issues as long as the compiler is a recent
>> GCC4.* (or any 3.*) or has the following patch applied to it if an early 
>> GCC
>> 4.*.
>>
>>  http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01115.html
>>

For completeness, that patch merely permits the pragma packing to 
override any structure size padding currently in effect for each struct 
(for ARM this is common for x86 it is not).

To actually turn on honoring of the #pragma pack *push/pop* directive in 
the ARM gcc //which is not enabled by default//, I had to add the 
#define HANDLE_PRAGMA_PACK_PUSH_POP in arm.h for my 4.1.0 chain. If Lars 
  has the gcc build environment already setup, he might want to try this.


And further, re-adding the __attribute__ thingies, always works because 
gcc honors these regardless of the struct push/pop packing directives 
(which it may be ignoring, as it was for my 4.1.0 before the change I 
detailed above).

Best,
Kostas




More information about the Scummvm-devel mailing list