This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add missing INCLUDE_DEFAULTS_MUSL_LOCAL


On 23/10/15 21:20, Joseph Myers wrote:
On Fri, 23 Oct 2015, Szabolcs Nagy wrote:

i think bsd libcs do the same, compiler headers interfering
with libc headers is problematic (e.g. FLT_ROUNDS is wrong
in gcc float.h, applications shouldn't see that), i'm not sure

FLT_ROUNDS is an ordinary compiler bug (bug 30569), should be fixable
reasonably straightforwardly as outlined at
<https://gcc.gnu.org/ml/gcc/2013-11/msg00317.html>, probably within say a
week's work if most architecture-specific changes are left to architecture
maintainers.

musl tries to support old compilers in general (it can be built
with gcc 3.x, and it should be possible to use with a wider range
of compilers with reasonably consistent semantics, so fixing that
bug in gcc does not help much.)

a better example would be stddef.h (it has incompatible definition
of NULL, max_align_t etc, the ifdefs in gcc are fragile and none
of the __need_FOO patterns match the ones musl use).

i think in general the higher level layer should come first
(c++ first, then libc, then compiler include paths), so the one
closer to the user gets a chance to override the ones after it,
stdc-predef.h was a good step toward that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]