Takes long duration for compilation

Nov 08, 2006 5 Replies

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



Karthik,

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

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 -------------------------------------------------- | Software Engineer email: Damion_deSoto@au.securecomputing.com | Secure Computing Corporation web: http://www.securecomputing.com | fax: +61 7 3891 3630 ph: +61 7 3435 2809 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---- Free Embedded Linux Distro at http://www.snapgear.org ----

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

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.

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

Dave

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required