Sujet : Re: question about linker
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : comp.lang.cDate : 14. Dec 2024, 14:47:57
Autres entêtes
Organisation : To protect and to server
Message-ID : <vjk2ab$26bef$1@paganini.bofh.team>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
bart <
bc@freeuk.com> wrote:
On 14/12/2024 04:36, Waldek Hebisch wrote:
David Brown <david.brown@hesbynett.no> wrote:
On 13/12/2024 15:20, Waldek Hebisch wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>
Personally I've also found some problems with TCC in building some
programs, eg. missing bits in headers, or sometimes some mysterious error.
On my machine tcc installs the following headers:
float.h stdarg.h stdbool.h stdnoreturn.h tcclib.h varargs.h
stdalign.h stdatomic.h stddef.h tccdefs.h tgmath.h
AFAICS the rest is taken from the system. I am not sure if tcc
can handle all system headers, but it handled several most popular
ones.
I run TCC in order to compare compilation speed, and to that end I will
sometimes tweak things (eg. I used my version of windows.h, or compiled
preprocessed C in order to avoid a mire of conditional blocks which try
and which determine which compile is running, and get it wrong).
Once a program has compiled, I don't remember bugs in TCC's code; it's
just a bit slower.
(BTW when I tried to build TCC from source using gcc-O3, I found the
resulting compiler even faster than the pre-build binaries! I found that
a bit scary so I test only with binaries as supplied.)
I compiled my from sources. Concerning "scary", there are many
factors affecting observed speed. Some can be classified as
measurement errors, some are actual difference in speed,
some inbetween (what about programs A and B, where at fixed
clock frequency A is faster, but OS/CPU reliably runs B at
higher clock frequency, giving it better measured time).
So, it is a bit scary to do measurements, one needs care to
properly interpret the results. OTOH I find pretty normal
that there are speed differences. I do not know your gcc
settings, but one possible difference is that pre-build binary
should run on wide variety of machines, with possibly suboptimal
speed on your machine, while locally compiled one may be
taylored to your machine. Or whoever created pr-build binary
did not bother to specify -O3. Or some weird semi-random factor
may cause observed result.
-- Waldek Hebisch