mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Peter Foley <pefoley2@pefoley.com>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v4] Fixes for compiling with clang
Date: Tue, 29 Nov 2016 15:22:53 +0100	[thread overview]
Message-ID: <b4a882d3-6125-e7b7-6c60-901fabfc23d9@suse.com> (raw)
In-Reply-To: <20161128064446.4892-1-pefoley2@pefoley.com>

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

  reply	other threads:[~2016-11-29 14:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-26  4:27 [PATCH] " Peter Foley
2016-11-26  6:34 ` kbuild test robot
2016-11-26  8:29 ` kbuild test robot
2016-11-26 18:02 ` [PATCH v2] " Peter Foley
2016-11-26 18:20   ` [PATCH v3] " Peter Foley
2016-11-28  6:44     ` [PATCH v4] " Peter Foley
2016-11-29 14:22       ` Michal Marek [this message]
2016-12-01 18:13         ` Peter Foley
2016-12-02 12:33           ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4a882d3-6125-e7b7-6c60-901fabfc23d9@suse.com \
    --to=mmarek@suse.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pefoley2@pefoley.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®