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]
Other format: [Raw text]

Re: What happens during optimization


On Fri, 2002-11-15 at 08:40, Grant Edwards wrote:
> On Fri, Nov 15, 2002 at 07:53:20AM -0700, Gary Thomas wrote:
> 
> > Did you rebuild everything after you added the optimization option?
> 
> Is it required that eCos and the app be compiled with the same
> level of optimization?

It all depends, but in general I would go for that.

The quoted example was apt;  the guy built his program and the
eCos kernel with no optimization.  Thus Cyg_Thread::self was a
real function.  When he rebuilt the kernel with optimization,
all of the uses of Cyg_Thread::self were inlined, thus there
was no copy for his code to link against.

Mixed optimized/not-optimized code can run into these sort
of problems where inline functions simply disappear.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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