This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Structure alignment with GCC


Christopher Bahns <chris@bahns.com> wrote:

> I'd like some kind of command line option to specify the
> default alignment of structures, but have searched the documentation (a
> bit outdated) and found nothing. The only possible solution I've seen
> mentioned so far is:
>
> [#pragma pack description snipped]

I've never heard of a command line option for this, but I may be wrong. My
understanding is that #pragma pack is the way this is generally done. The
gotcha is that gcc's configury enables it for some targets but not for others.
Whoever told you to patch config/i386/linux.h was telling you how to enable
#pragma pack for the i386 Linux target, presumably because it's disabled in the
standard distribution (I don't know as I don't do i386 or Linux).

I don't remember off the top of my head whether #pragma pack is enabled for
m68k-coff or not. Just try it. If it doesn't work, then you need to enable it
by patching the right file in the config/m68k subdirectory.

I hope this helps.

--
Michael Sokolov		Harhan Engineering Laboratory
Public Service Agent	International Free Computing Task Force
			International Engineering and Science Task Force
			615 N GOOD LATIMER EXPY STE #4
			DALLAS TX 75204-5852 USA

Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]