nanogui: Re: ARM, C++ and -mstructure-size-boundary=8


Previous by date: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier
Next by date: 26 Sep 2002 01:09:20 -0000 how to use Fl_Pixmap to load a image from file, lucksender.sohu.com
Previous in thread: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier
Next in thread: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier

Subject: Re: [nanogui] FW: ARM, C++ and -mstructure-size-boundary=8
From: "Greg Haerr" ####@####.####
Date: 26 Sep 2002 01:09:20 -0000
Message-Id: <068a01c264f8$26ec90e0$3aba46a6@xmission.com>

: When linking a C++ program to microwindows, we found out that the size of
: the MWPALENTRY structure was 4 bytes in the C++ routines and 3 bytes in
: Microwindows code (in C).
: 
: I also noticed that microwindows was compiled, for the ARM targets, with
: -mstructure-boundary-size=8. I didnt compile the C++ program with this
: option, but I removed it from the microwindows source code and now the
: sizeof(MWPALENTRY) is always 4.
: 
: I noticed in the changelog that this gcc option was supposed to fix a bug,
: can someone tell me more about this ?

You've basically found the bug and the original solution.  The
CVS version of Microwindows adds a dummy UCHAR to the
MWPALENTRY structure so that the -mstructure-boundary-size
option should no longer be needed.

I originally ran into this when porting Doom to Nano-X/ARM, since
Doom requires byte-padded rather than long-padded structures.

Regards,

Greg


Previous by date: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier
Next by date: 26 Sep 2002 01:09:20 -0000 how to use Fl_Pixmap to load a image from file, lucksender.sohu.com
Previous in thread: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier
Next in thread: 26 Sep 2002 01:09:20 -0000 Re: ARM, C++ and -mstructure-size-boundary=8, Fabrice Gautier


Powered by ezmlm-browse 0.20.