Re: [GIT PULL v2] Kbuild updates for v5.15-rc1

From: Florian Weimer
Date: Sat Sep 04 2021 - 11:19:34 EST


* Segher Boessenkool:

> Let me quote the original mail (I had to dig it out of the archives as
> well, no nice threading, too lazy, sorry):

It still doesn't say why. I did see a reference to fleeting reference
to <stdatomic.h> and <float.h>.

My conjecture is that the real reason is avoid atomic emulation
(softatomic?) and softfloat code. It's not related to <stdarg.h> at
all: this header is replaced so that GCC's include subdirectory can be
dropped from the include search path. What I don't know if this is to
avoid obscure linker failures related to libatomic/softfloat (obviously
not great) or run-time failures (worse).

In any case, it would be nice to know what the real motivation is.

After all, <stdatomic.h> is exactly like <stdarg.h> in that it's
possible to use its functionality even without the header file. The
__atomic builtins are even documented in the GCC manual (unlike
<stdatomic.h>), which is why some programmers prefer them over the
standard interface. And then there's the _Atomic keyword itself, whose
use can easily result in calls to libatomic functions, too. So blocking
<stdatomic.h> makes little sense to me.

I don't know enough about softfloat if blocking the inclusion of
<float.h> is worth it.

Thanks,
Florian