On Thu, Jan 05, 2017 at 03:37:43PM +0100, Mark Kettenis wrote:
> The clang in base installs several header files in
> /usr/lib/clang/3.8.1/include that are interfering somewhat with our
> own headers.  In particular these headers don't include <sys/cdefs.h>
> which leads to issues because our own headers expect that they don't
> have to include <sys/cdef.h> themselves because some other standard
> header already does this for them.
> 
> My proposal is that we stop installing the following header files:
> 
>   float.h
>   inttypes.h
>   iso646.h
>   limits.h
>   stdarg.h
>   stdbool.h
>   stddef.h
>   __stddef_max_align_t.h
>   stdint.h
>   vadefs.h
> 
> Our own header files should be mostly good enough.  Just some minor
> C11 stuff is missing:
> 
> * FLT_TRUE_MIN, DBL_TRUE_MIN, LDBL_TRUE_MIN in float.h
> 
> * max_align_t in stddef.h
> 
> It should be possible to implement the missing functionality pretty quickly.
> 
> The vadefs.h is some Microsoft invention that we don't want.
> 
> At some point we should also consider to only install the intrinsics
> header files for the target; it doesn't make a lot of sense to install
> the SSE intrinsics header files on armv7 for example.  But that can be
> addressed later.
> 
> ok?

Sure, that's a good start.  Apparently FreeBSD installs even less, but
I don't know if having/removing those would hurt at all.

ok patrick@

> 
> 
> Index: gnu/usr.bin/clang/include/clang/intrin/Makefile
> ===================================================================
> RCS file: /cvs/src/gnu/usr.bin/clang/include/clang/intrin/Makefile,v
> retrieving revision 1.2
> diff -u -p -r1.2 Makefile
> --- gnu/usr.bin/clang/include/clang/intrin/Makefile   8 Sep 2016 18:05:30 
> -0000       1.2
> +++ gnu/usr.bin/clang/include/clang/intrin/Makefile   5 Jan 2017 14:34:59 
> -0000
> @@ -29,7 +29,6 @@ HEADERS=adxintrin.h \
>       cuda_builtin_vars.h \
>       emmintrin.h \
>       f16cintrin.h \
> -     float.h \
>       fma4intrin.h \
>       fmaintrin.h \
>       fxsrintrin.h \
> @@ -38,9 +37,6 @@ HEADERS=adxintrin.h \
>       ia32intrin.h \
>       immintrin.h \
>       Intrin.h \
> -     inttypes.h \
> -     iso646.h \
> -     limits.h \
>       lzcntintrin.h \
>       mm3dnow.h \
>       mmintrin.h \
> @@ -56,18 +52,12 @@ HEADERS=adxintrin.h \
>       shaintrin.h \
>       smmintrin.h \
>       stdalign.h \
> -     stdarg.h \
>       stdatomic.h \
> -     stdbool.h \
> -     stddef.h \
> -     __stddef_max_align_t.h \
> -     stdint.h \
>       stdnoreturn.h \
>       tbmintrin.h \
>       tgmath.h \
>       tmmintrin.h \
>       unwind.h \
> -     vadefs.h \
>       varargs.h \
>       vecintrin.h \
>       __wmmintrin_aes.h \
> 

Reply via email to