[ECOS] Ethernet driver: alignment warning
Fabrice Gautier
Fabrice_Gautier@sdesigns.com
Wed Oct 18 15:15:00 GMT 2000
> -----Original Message-----
> From: Christian Plessl [ mailto:cplessl@ee.ethz.ch ]
> Sent: Wednesday, October 18, 2000 9:22 AM
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] Ethernet driver: alignment warning
>
[...]
>
> When I compile ecos with network support I always get the
> following warning:
>
> warning: alignment of `if_ne2k_netdev' is greater than
> maximum object file
> alignment. Using 4.
Same thing for me, I believe it is safe to ignore.
However in order to get rid of it you can set the alignement in basetype.h.
Currently this file says:
//--------------------------------------------------------------------------
---
// Override the alignment definitions from cyg_type.h. x86 requires
// 32 *byte* alignment because gcc sometimes tries to be clever with
// aligning things on cache lines.
#define CYGARC_ALIGNMENT 32
#define CYGARC_P2ALIGNMENT 5
But gcc will not warn only with
#define CYGARC_ALIGNMENT 4
#define CYGARC_P2ALIGNMENT 2
I don't understand the comment. It seems that the cleverness of gcc has
evolved since then....
--
Fabrice Gautier
fabrice_gautier@sdesigns.com
More information about the Ecos-discuss
mailing list