Re: question about linker

Liste des GroupesRevenir à cl c 
Sujet : Re: question about linker
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c
Date : 07. Dec 2024, 19:06:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj22qh$37g4b$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla Thunderbird
On 07/12/2024 17:57, Bart wrote:
On 07/12/2024 16:17, David Brown wrote:
On 06/12/2024 23:26, Scott Lurndal wrote:
David Brown <david.brown@hesbynett.no> writes:
On 04/12/2024 23:48, Scott Lurndal wrote:
David Brown <david.brown@hesbynett.no> writes:
On 04/12/2024 17:55, Scott Lurndal wrote:
>
13 minutes by the wall clock, a bit over an hour
of CPU time.
>
>
Is that a "typical" build - or an atypical full clean build?
>
>
That was a build that touched a key header file, so maybe
85% full.  A full build adds a minute or two wall time.
>
A single source file build (for most source files) takes
about 28 seconds real, a large portion of that in make as it
figures out what to rebuild in a project with thousands
of source files and associated dependencies.
>
That sounds like your dependency handling in make is not ideal.  Store
your dependencies in individual files per source file, where both the
object file and the dependency file itself are dependent on the headers
used by the C file.  (The makefile should also have both the object file
and the dependency file dependent on the C source file.)
>
We use the standard makedepend support built into GCC.  It creates
a .d file for each source file that contains the dependencies
for that source file.
>
This is part of the makefile macro I use when generating dependency files:
>
        $(CCDEP) $(combined_cflags) $(2) $(3) -MM -MP \
                       -MT $(obj_dir)$(1)$$(@F:%.d=%.o) \
                       -MT $(dep_dir)$(1)$$(@F:%.o=%.o) \
                       -MF $$@ $$<
>
The point is that because the dependency files themselves are also targets in these dependency files, they don't need to be re-build unnecessarily.
>
>
Scale matters, (with two thousand+ source and header files, that's a lot
of 'access', 'read' and 'stat' system calls just to build the dependency
graph.   On NFS filesystems, which we use in most environments, the make
takes even more time.
>
>
If the issue is stat'ing the times for those files in order to check the dependencies, then I understand the bottleneck.  But I would not expect people to be sharing a source tree on NFS like that - it is certainly not the usual way of collaborating on projects.
>
Certainly it all sounds like you are doing something seriously inefficient.  You've only got ten times the number of files that I have, but massively slower update builds.
 This is to be lauded. Somebody actually questioning something whether build-times should be that long.
 Somebody other than me, that is.
 
There's a big difference, however.  I am asking Scott with a view to helping him get more efficient use out of the good tools he uses. (Scott's been doing this stuff pretty much since the dawn of time, but there's still a possibility that there are things he has not thought about.)
I am not suggesting he switches to crappy tools that might be faster, or boasting that my language is infinitely superior because it compiles faster, or whining about C in a C newsgroup, or making strawman arguments in an attempt to prove my position.
I am trying to see if there are ideas that could make his builds faster for his convenience - alternatively, I am trying to see if there are particular reasons for the extra time his builds take so that I can be sure to avoid the same circumstances in my own work.

Date Sujet#  Auteur
26 Nov 24 * question about linker383Thiago Adams
26 Nov 24 +* Re: question about linker16Thiago Adams
26 Nov 24 i`* Re: question about linker15Bart
26 Nov 24 i `* Re: question about linker14Thiago Adams
27 Nov 24 i  +* Re: question about linker2BGB
27 Nov 24 i  i`- Re: question about linker1Bart
27 Nov 24 i  +* Re: question about linker5David Brown
27 Nov 24 i  i`* Re: question about linker4Thiago Adams
27 Nov 24 i  i +* Re: question about linker2David Brown
27 Nov 24 i  i i`- Re: question about linker1Thiago Adams
2 Dec 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker6Michael S
27 Nov 24 i   `* Re: question about linker5Thiago Adams
27 Nov 24 i    `* Re: question about linker4Michael S
27 Nov 24 i     +- Re: question about linker1David Brown
28 Nov 24 i     +- Re: question about linker1Tim Rentsch
2 Dec 24 i     `- Re: question about linker1BGB
26 Nov 24 +* Re: question about linker20Bart
26 Nov 24 i`* Re: question about linker19Thiago Adams
26 Nov 24 i `* Re: question about linker18Bart
27 Nov 24 i  +* Re: question about linker3BGB
27 Nov 24 i  i`* Re: question about linker2fir
27 Nov 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker14Bart
27 Nov 24 i   +* Re: question about linker12Thiago Adams
27 Nov 24 i   i+- Re: question about linker1Thiago Adams
27 Nov 24 i   i`* Re: question about linker10Bart
27 Nov 24 i   i +* Re: question about linker6Bart
27 Nov 24 i   i i`* Re: question about linker5Thiago Adams
27 Nov 24 i   i i +* Re: question about linker3Thiago Adams
27 Nov 24 i   i i i`* Re: question about linker2Thiago Adams
27 Nov 24 i   i i i `- Re: question about linker1Bart
27 Nov 24 i   i i `- Re: question about linker1Bart
27 Nov 24 i   i `* Re: question about linker3Thiago Adams
27 Nov 24 i   i  `* Re: question about linker2Bart
27 Nov 24 i   i   `- Re: question about linker1Thiago Adams
28 Nov 24 i   `- Re: question about linker1Tim Rentsch
27 Nov 24 `* Re: question about linker346Waldek Hebisch
27 Nov 24  `* Re: question about linker345Thiago Adams
28 Nov 24   `* Re: question about linker344Keith Thompson
28 Nov 24    `* Re: question about linker343Thiago Adams
28 Nov 24     +* Re: question about linker338Bart
28 Nov 24     i`* Re: question about linker337Keith Thompson
28 Nov 24     i `* Re: question about linker336Bart
28 Nov 24     i  `* Re: question about linker335Keith Thompson
29 Nov 24     i   `* Re: question about linker334Bart
29 Nov 24     i    +* Re: question about linker3Keith Thompson
29 Nov 24     i    i`* Re: question about linker2Bart
29 Nov 24     i    i `- Re: question about linker1Keith Thompson
29 Nov 24     i    `* Re: question about linker330David Brown
29 Nov 24     i     `* Re: question about linker329Bart
29 Nov 24     i      +- Re: question about linker1Ike Naar
29 Nov 24     i      +* Re: question about linker326Michael S
29 Nov 24     i      i+* Re: question about linker323Bart
29 Nov 24     i      ii`* Re: question about linker322Michael S
29 Nov 24     i      ii +* Re: question about linker320David Brown
29 Nov 24     i      ii i`* Re: question about linker319Bart
29 Nov 24     i      ii i +* Re: question about linker165Keith Thompson
29 Nov 24     i      ii i i`* Re: question about linker164Bart
30 Nov 24     i      ii i i `* Re: question about linker163Keith Thompson
30 Nov 24     i      ii i i  +* Re: question about linker95Waldek Hebisch
30 Nov 24     i      ii i i  i+- Re: question about linker1Keith Thompson
30 Nov 24     i      ii i i  i+* Re: question about linker3James Kuyper
30 Nov 24     i      ii i i  ii`* Re: question about linker2Michael S
3 Dec 24     i      ii i i  ii `- Re: question about linker1Tim Rentsch
1 Dec 24     i      ii i i  i`* Re: question about linker90David Brown
1 Dec 24     i      ii i i  i +* Re: question about linker88Bart
1 Dec 24     i      ii i i  i i`* Re: question about linker87David Brown
1 Dec 24     i      ii i i  i i `* Re: question about linker86Bart
2 Dec 24     i      ii i i  i i  `* Re: question about linker85David Brown
2 Dec 24     i      ii i i  i i   `* Re: question about linker84Bart
2 Dec 24     i      ii i i  i i    +* Re: question about linker78David Brown
2 Dec 24     i      ii i i  i i    i+* Re: question about linker72Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii+* Re: question about linker70Bart
2 Dec 24     i      ii i i  i i    iii+* Re: question about linker68David Brown
2 Dec 24     i      ii i i  i i    iiii`* Re: question about linker67Bart
3 Dec 24     i      ii i i  i i    iiii `* Re: question about linker66David Brown
3 Dec 24     i      ii i i  i i    iiii  +* Re: question about linker53Bart
3 Dec 24     i      ii i i  i i    iiii  i`* Re: question about linker52David Brown
3 Dec 24     i      ii i i  i i    iiii  i `* Re: question about linker51Bart
4 Dec 24     i      ii i i  i i    iiii  i  `* Re: question about linker50David Brown
4 Dec 24     i      ii i i  i i    iiii  i   `* Re: question about linker49Bart
4 Dec 24     i      ii i i  i i    iiii  i    `* Re: question about linker48David Brown
4 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker24Bart
5 Dec 24     i      ii i i  i i    iiii  i     i`* Re: question about linker23David Brown
5 Dec 24     i      ii i i  i i    iiii  i     i +- Re: question about linker1Janis Papanagnou
5 Dec 24     i      ii i i  i i    iiii  i     i `* Re: question about linker21Bart
6 Dec 24     i      ii i i  i i    iiii  i     i  `* Re: question about linker20David Brown
6 Dec 24     i      ii i i  i i    iiii  i     i   `* Re: question about linker19Bart
6 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker5Ike Naar
6 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker2Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker10David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker9Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `* Re: question about linker8David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i  `* Re: question about linker7Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i   `* Re: question about linker6David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i    `* Re: question about linker5Bart
8 Dec 24     i      ii i i  i i    iiii  i     i    i     +* Re: question about linker3Ben Bacarisse
8 Dec 24     i      ii i i  i i    iiii  i     i    i     `- Re: question about linker1David Brown
8 Dec 24     i      ii i i  i i    iiii  i     i    `* Re: question about linker3Waldek Hebisch
5 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker15Waldek Hebisch
11 Dec 24     i      ii i i  i i    iiii  i     `* Re: question about linker8James Kuyper
3 Dec 24     i      ii i i  i i    iiii  `* Re: question about linker12Bart
3 Dec 24     i      ii i i  i i    iii`- Re: question about linker1Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii`- Re: question about linker1Bart
2 Dec 24     i      ii i i  i i    i`* Re: question about linker5Bart
4 Dec 24     i      ii i i  i i    `* Re: question about linker5Waldek Hebisch
1 Dec 24     i      ii i i  i `- Re: question about linker1Janis Papanagnou
30 Nov 24     i      ii i i  +* Re: question about linker44Bart
30 Nov 24     i      ii i i  +- Re: question about linker1Janis Papanagnou
1 Dec 24     i      ii i i  `* Re: question about linker22David Brown
30 Nov 24     i      ii i `* Re: question about linker153David Brown
5 Dec 24     i      ii `- Re: question about linker1Tim Rentsch
30 Nov 24     i      i`* Re: question about linker2Tim Rentsch
29 Nov 24     i      `- Re: question about linker1David Brown
28 Nov 24     `* Re: question about linker4Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal