This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Ethernet driver: alignment warning
- To: 'Christian Plessl' <cplessl at ee dot ethz dot ch>, ecos-discuss at sources dot redhat dot com
- Subject: RE: [ECOS] Ethernet driver: alignment warning
- From: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Date: Wed, 18 Oct 2000 15:14:40 -0700
> -----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