This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

RE: Ethernet driver: alignment warning


> -----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 




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