This is the mail archive of the ecos-patches@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]
Other format: [Raw text]

Re: init_priority fix for services/memalloc


man, 27.09.2004 kl. 19.39 skrev Andrew Lunn:
> On Mon, Sep 27, 2004 at 03:27:02PM +0200, ?yvind Harboe wrote:
> > The following works w/GCC 3.4.2:
> > 
> > static foo CYGBLD_ATTRIB_INIT_PRI(N) bar;
> > 
> > This does not:
> > 
> > static foo bar CYGBLD_ATTRIB_INIT_PRI(N) ;
> 
> Is this just the init priority attribute or do all attributes break?

Don't know.

> How does it break. Syntax error or code which does the wrong
> thing.

Code does wrong thing.

The "-finit-priority" command line option no longer exists in GCC 3.4.2,
so I had to remove it before I could compile my app. I believe this to
be harmless though.

What I observed was that my initialisation routine was getting called
before pools where allocated, instead of before as with the toolchain
that I downloaded from sources.redhat.com/ecos.

When I modified the code as in the patch, things went back to "normal".


>  Before changing eCos i would first list to check the its not
> GCC thats actually broken.

It would be nice to have a consensus from the eCos community before I
shout "compiler bug!" :-)

If my observations are correct then surely this is a compiler bug... Or
perhaps a problem w.r.t. how I built the compiler or somesuch.

>         Thanks
>                 Andrew
-- 
Øyvind Harboe
http://www.zylin.com



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