Subject: Re: cross-cygwin32; alignement problems
To: TAMURA Kent <kent@hauN.org>
From: Arto Huusko <arto.huusko@utu.fi>
List: tech-pkg
Date: 10/10/2001 11:53:15
On Wed, 10 Oct 2001, TAMURA Kent wrote:

> In message "Re: cross-cygwin32; alignement problems"
>     on 01/10/03, Arto Huusko <arto.huusko@utu.fi> writes:
> > > To be usefull, the cross compiler needs to honour #pragma pack(push),
> > > #pragma pack(<number>) and #pragma pack(pop).
> >
> > Apparently the i386-cygwin32 cross-compiler does not honour it. It
> > works just fine with the real cygwin's compiler (gcc 2.95.something).
>
> The i386-cygwin32 is based on egcs-1.1.1, which does not support
> "#pragma pack".  The resolution of the problem is
>   - Adding "__attribute__((packed))" to each structure as Martin wrote, or

Thanks, I'll try that.

But is there any hope that i386-cygwin32 would be upgraded to 2.95.2?

>   - Upgrading to gcc-2.95.x.
>
> The i386-netbsdpe is based on gcc-2.95.2 and it has no problem
> on structure packing.

I figured that i386-netbsdpe can't produce code that runs on an actual
Windows machine, or am I wrong. I need to produce executables to run
on Windows.

Of course, I could go and just boot Windows and use the real cygwin,
but I'd rather not, and on VMWare compiling anything is slow as hell.

-- Arto