Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-26 Thread Miguel Ojeda
Hi all, On Fri, Aug 24, 2018 at 1:31 AM, Joe Perches wrote: > On Thu, 2018-08-23 at 16:12 -0700, Nick Desaulniers wrote: >> On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: >> > >> > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: >> > > Not this case; it's how we get gnu89

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-26 Thread Miguel Ojeda
Hi all, On Fri, Aug 24, 2018 at 1:31 AM, Joe Perches wrote: > On Thu, 2018-08-23 at 16:12 -0700, Nick Desaulniers wrote: >> On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: >> > >> > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: >> > > Not this case; it's how we get gnu89

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 16:12 -0700, Nick Desaulniers wrote: > On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: > > > > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > > > One reply for a bunch of the various threads, to keep the number of > > > emails down: > > > > > > On Wed,

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 16:12 -0700, Nick Desaulniers wrote: > On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: > > > > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > > > One reply for a bunch of the various threads, to keep the number of > > > emails down: > > > > > > On Wed,

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Nick Desaulniers
On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: > > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > > One reply for a bunch of the various threads, to keep the number of emails > > down: > > > > On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > > > On Wed, 2018-08-22 at 16:37

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Nick Desaulniers
On Thu, Aug 23, 2018 at 2:19 PM Joe Perches wrote: > > On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > > One reply for a bunch of the various threads, to keep the number of emails > > down: > > > > On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > > > On Wed, 2018-08-22 at 16:37

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Dominique Martinet
Nick Desaulniers wrote on Thu, Aug 23, 2018: > > On a side note, I noticed tools/include/linux/compiler.h includes > > linux/compiler-gcc.h but maybe it should include linux/compiler_types.h? > > (I'm not sure at who uses that header, so it really is an open question > > here) > > Without looking

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Dominique Martinet
Nick Desaulniers wrote on Thu, Aug 23, 2018: > > On a side note, I noticed tools/include/linux/compiler.h includes > > linux/compiler-gcc.h but maybe it should include linux/compiler_types.h? > > (I'm not sure at who uses that header, so it really is an open question > > here) > > Without looking

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > One reply for a bunch of the various threads, to keep the number of emails > down: > > On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > > > +/* Compiler specific

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > One reply for a bunch of the various threads, to keep the number of emails > down: > > On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > > > +/* Compiler specific

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > One of these days, I'll get frustrated enough to > rewrite checkpatch.pl as a set of clang tidy checks (so that it > actually parses the code), but I'll have to learn how to read perl > first to start translating. Good luck with that,

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Joe Perches
On Thu, 2018-08-23 at 14:03 -0700, Nick Desaulniers wrote: > One of these days, I'll get frustrated enough to > rewrite checkpatch.pl as a set of clang tidy checks (so that it > actually parses the code), but I'll have to learn how to read perl > first to start translating. Good luck with that,

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Nick Desaulniers
One reply for a bunch of the various threads, to keep the number of emails down: On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > > +/* Compiler specific macros. */ > > #ifdef __clang__ > > #include > > probably better as > >

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Nick Desaulniers
One reply for a bunch of the various threads, to keep the number of emails down: On Wed, Aug 22, 2018 at 5:20 PM Joe Perches wrote: > On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > > +/* Compiler specific macros. */ > > #ifdef __clang__ > > #include > > probably better as > >

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Kees Cook
On Wed, Aug 22, 2018 at 6:02 PM, Linus Torvalds wrote: > On Wed, Aug 22, 2018 at 5:25 PM Dominique Martinet > wrote: >> >> Overall looks good to me, just pointing at the same error I wrote in my >> other mail here -- I saw that by the time I was done writing this this >> patch got taken but that

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-23 Thread Kees Cook
On Wed, Aug 22, 2018 at 6:02 PM, Linus Torvalds wrote: > On Wed, Aug 22, 2018 at 5:25 PM Dominique Martinet > wrote: >> >> Overall looks good to me, just pointing at the same error I wrote in my >> other mail here -- I saw that by the time I was done writing this this >> patch got taken but that

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Masahiro Yamada
Hi Nick 2018-08-23 8:37 GMT+09:00 Nick Desaulniers : > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. > > Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and > __GNUC_PATCHLEVEL__ for

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Masahiro Yamada
Hi Nick 2018-08-23 8:37 GMT+09:00 Nick Desaulniers : > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. > > Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and > __GNUC_PATCHLEVEL__ for

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 6:10 PM Dominique Martinet wrote: > > I'm not building linux directly, but BPF programs that indirectly uses > clang with bcc Oh, ok. I _can_ test the basic build (just not get a working link and a kernel) by just forcing it, so I guess I'll call that testing enough.

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 6:10 PM Dominique Martinet wrote: > > I'm not building linux directly, but BPF programs that indirectly uses > clang with bcc Oh, ok. I _can_ test the basic build (just not get a working link and a kernel) by just forcing it, so I guess I'll call that testing enough.

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Dominique Martinet
Linus Torvalds wrote on Wed, Aug 22, 2018: > I've fixed that manually, but when I tried to test it I just hit the > > arch/x86/Makefile:179: *** Compiler lacks asm-goto support.. Stop. > > error. > > Do you have some experimental clang build with asm goto support? What > version? Or is it

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Dominique Martinet
Linus Torvalds wrote on Wed, Aug 22, 2018: > I've fixed that manually, but when I tried to test it I just hit the > > arch/x86/Makefile:179: *** Compiler lacks asm-goto support.. Stop. > > error. > > Do you have some experimental clang build with asm goto support? What > version? Or is it

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 5:25 PM Dominique Martinet wrote: > > Overall looks good to me, just pointing at the same error I wrote in my > other mail here -- I saw that by the time I was done writing this this > patch got taken but that alone will probably warrant a follow-up :/ I've fixed that

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 5:25 PM Dominique Martinet wrote: > > Overall looks good to me, just pointing at the same error I wrote in my > other mail here -- I saw that by the time I was done writing this this > patch got taken but that alone will probably warrant a follow-up :/ I've fixed that

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Dominique Martinet
Nick Desaulniers wrote on Wed, Aug 22, 2018: > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. > > Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and > __GNUC_PATCHLEVEL__ for quick

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Dominique Martinet
Nick Desaulniers wrote on Wed, Aug 22, 2018: > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. > > Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and > __GNUC_PATCHLEVEL__ for quick

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 4:39 PM Nick Desaulniers wrote: > > Rather than always including compiler-gcc.h then undefining or > redefining macros in compiler-intel.h or compiler-clang.h, let's > separate out the compiler specific macro definitions into mutually > exclusive headers, do more proper

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Linus Torvalds
On Wed, Aug 22, 2018 at 4:39 PM Nick Desaulniers wrote: > > Rather than always including compiler-gcc.h then undefining or > redefining macros in compiler-intel.h or compiler-clang.h, let's > separate out the compiler specific macro definitions into mutually > exclusive headers, do more proper

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Joe Perches
On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. style trivia: > diff --git a/include/linux/compiler_types.h

Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Joe Perches
On Wed, 2018-08-22 at 16:37 -0700, Nick Desaulniers wrote: > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") > recently exposed a brittle part of the build for supporting non-gcc > compilers. style trivia: > diff --git a/include/linux/compiler_types.h

[PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Nick Desaulniers
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") recently exposed a brittle part of the build for supporting non-gcc compilers. Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't added compiler

[PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

2018-08-22 Thread Nick Desaulniers
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") recently exposed a brittle part of the build for supporting non-gcc compilers. Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't added compiler