Re: Takes long duration for compilation



Damion de Soto wrote:
Karthik,

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 ?

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


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.

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@xxxxxxxxxxxxxxxxxxxxxx
| 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

.



Relevant Pages

  • Re: Use of C99 int types
    ... > those that actually are part of the C-implementation for Linux. ... the kernel definitions are part of /usr/include). ... The kernel uses __foobar stuff provided by the compiler because it has ... > the Gimp and GCC run on completely different architectures aswell. ...
    (Linux-Kernel)
  • Re: Linux build in Windows
    ... "> I need to compile a program for both Linux and Windows environments. ... How can I perform a compilation for Linux ... "> environment in Windows? ... different (a 680xx compiler for a 68020 SBC with some embeded UNIX-ish ...
    (comp.os.linux.misc)
  • Re: function pointers
    ... I am using gcc under ... gdb, and the compiler, exactly like in 1986 when I first started using ... when running on linux, I usually use gedit or kedit. ... There is only one debugger: ...
    (comp.lang.c)
  • Re: 1] UNIX/LINUX Compilation 2] IDE
    ... under Unix or Linux? ... compiler, and Josh Vanderhoof's Cross ELF linker. ... AFAICT, RHIDE is the only ... VIM is in some ways as good as GNU Emacs ...
    (comp.os.msdos.djgpp)
  • Re: Use of C99 int types
    ... the compiler. ... > Except the kernel wants to be optimized and work and use what features ... And where exactly are linux and libc when compiling code for an ... Just to make the bloody point GCC is not dependent on Linux in any way ...
    (Linux-Kernel)