This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add missing INCLUDE_DEFAULTS_MUSL_LOCAL
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Doug Evans <dje at google dot com>, Bernd Schmidt <bschmidt at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, Rich Felker <dalias at libc dot org>
- Date: Mon, 26 Oct 2015 12:32:01 +0000
- Subject: Re: [PATCH] Add missing INCLUDE_DEFAULTS_MUSL_LOCAL
- Authentication-results: sourceware.org; auth=none
- References: <047d7b6d8c8c4d13600522a1ffa5 at google dot com> <562A697E dot 5040608 at redhat dot com> <CADPb22SqEK0ZgHwMD4bBM8B60xyOeSFCW8nvguD+zXandEXQgw at mail dot gmail dot com> <562A7DBC dot 1060400 at arm dot com> <alpine dot DEB dot 2 dot 10 dot 1510232012140 dot 5421 at digraph dot polyomino dot org dot uk>
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.