Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532341
| From | Michal Marek <mmarek@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4] Fixes for compiling with clang |
| Date | 2016-11-29 15:30 +0100 |
| Message-ID | <sIRzY-1bf-39@gated-at.bofh.it> (permalink) |
| References | <sHPTz-1JW-15@gated-at.bofh.it> <sInVg-724-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Dne 28.11.2016 v 07:44 Peter Foley napsal(a): > Fix reversed conditional checking if HOSTCC is clang. > Suppress warnings about unsupported optimization options. > Suppress warnings about unused functions, as they are generated for > every module and are therefore far too spammy. > Disable clang's integrated assembler which is incompatible with kernel > asm constructs. > > Changes from v1: > * Move the $(cc-name) conditional below the definition of $(CC) > Changes from v2: > * Actually commit the changes in v2. > Changes from v3: > * HOSTCC is not guaranteed to be the same as CC, adjust accordingly. > > Signed-off-by: Peter Foley <pefoley2@pefoley.com> > --- > Makefile | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index 694111b43cf8..9c4803a74117 100644 > --- a/Makefile > +++ b/Makefile > @@ -301,12 +301,12 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ > > HOSTCC = gcc > HOSTCXX = g++ > -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 > +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 \ > + -Wno-unused-value -Wno-unused-parameter -Wno-missing-field-initializers > HOSTCXXFLAGS = -O2 This adds new -Wno-* options also for the gcc case, is there a reason for this? Also, the -Wno-missing-field-initializers option is not available in some old gccs, so we would need a HOSTCC equivalent of cc-disable-warning. Michal
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Fixes for compiling with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-26 05:40 +0100
Re: [PATCH] Fixes for compiling with clang kbuild test robot <lkp@intel.com> - 2016-11-26 07:40 +0100
[PATCH v2] Fixes for compiling with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-26 19:10 +0100
[PATCH v3] Fixes for compiling with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-26 19:30 +0100
[PATCH v4] Fixes for compiling with clang Peter Foley <pefoley2@pefoley.com> - 2016-11-28 07:50 +0100
Re: [PATCH v4] Fixes for compiling with clang Michal Marek <mmarek@suse.com> - 2016-11-29 15:30 +0100
Re: [PATCH v4] Fixes for compiling with clang Peter Foley <pefoley2@pefoley.com> - 2016-12-01 19:20 +0100
Re: [PATCH v4] Fixes for compiling with clang Michal Marek <mmarek@suse.com> - 2016-12-02 13:40 +0100
csiph-web