Takes long duration for compilation

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

I have pretty big makefile for a embedded project with large number of
big modules . I find that it is taking hours to get compiled in linux
environment. How to get this done in few minutes as it is difficult
while debugging ?

I find that the Codewarrior Compiler compiles the same embedded
application in less than a minute.

Apart from changes in compiler dependent stuffs (assembly and other
conventions)  in Codewarrior, the same code is used in linux
environment also.

Kindly share your views regarding this .

Tonnes of Thx in advans,
Karthik Balaguru


Re: Takes long duration for compilation
Karthik,

Quoted text here. Click to load it

How big are we talking here?  I consider the linux kernel Makefile
pretty big at 50k.


Quoted text here. Click to load it

Have you tried compiling a single file manually, to see if it's
the compiler or your makefile taking longer time?


regards,


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | Damion de Soto --------------------------------------------------
We've slightly trimmed the long signature. Click to see the full one.
Re: Takes long duration for compilation
Quoted text here. Click to load it


hmmm, Obviously, the makefile is the culprit . Gcc is perfectly fast.
(No issues w.r.t it)
I am also aware of it.

Based on your feedback, I think the question should be reframed .
So, i should have askd the question like this - "Why linux environment
compilation & linking
takes long duration  ? "

(Regarding Size - It is smaller than linux :) )

The project is having large number of directories & subdirectories.
Earlier i faced system resources problem . So, the sources (C and C++
are put separately)
are put in respective directories, headers in another directory with
libraries in other respective
separate dirctories etc.

But, since it has to refer lot of libraries /headers. i think, it is
taking time.
But, how is it possible that the Codewarrior compiler compiles in few
minutes for the
same set of source-code. It also internally uses makefile concepts
only.

And why mine is consuming such a long time ??
Where could be the problem ???

Thx in advans,
Karthik Balaguru


Re: Takes long duration for compilation

Quoted text here. Click to load it

No offence, but it's a pretty silly question. Tell us how long it is
taking to compile, and what kind of machine you are running with (CPU,
memory etc).

On my two-way SMP machine the Linux 2.4.20 kernel compiles in about a
minute using a parallel compile.

Re: Takes long duration for compilation

Quoted text here. Click to load it

Pentium 4, RAM - 1 GB.


Re: Takes long duration for compilation
Quoted text here. Click to load it

Time your compile, then time "make -j 7; make" and let us know the results.


Dave

Site Timeline