All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Wendling <morbo@google.com>
To: Thomas Huth <thuth@redhat.com>
Cc: kvm list <kvm@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Jim Mattson <jmattson@google.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>
Subject: Re: [kvm-unit-tests PATCH v3 3/6] Makefile: use "-Werror" in cc-option
Date: Fri, 8 Nov 2019 12:36:13 -0800	[thread overview]
Message-ID: <CAGG=3QXgCseTiZ-5qeUqwE6L4E8DxNr8nbthacgH-BAQCn6e3g@mail.gmail.com> (raw)
In-Reply-To: <e4c7494f-1ca5-fe6e-7238-08307fa3bccb@redhat.com>

I sent out another set of patches for the -Werror, because I didn't
see the ones I posted on the list and thought they got lost.


On Fri, Nov 8, 2019 at 12:43 AM Thomas Huth <thuth@redhat.com> wrote:
>
> On 30/10/2019 22.04, Bill Wendling wrote:
> > The "cc-option" macro should use "-Werror" to determine if a flag is
> > supported. Otherwise the test may not return a nonzero result. Also
> > conditionalize some of the warning flags which aren't supported by
> > clang.
> >
> > Signed-off-by: Bill Wendling <morbo@google.com>
> > ---
> >   Makefile | 16 ++++++++++------
> >   1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 32414dc..6201c45 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -46,13 +46,13 @@ include $(SRCDIR)/$(TEST_DIR)/Makefile
> >   # cc-option
> >   # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
> >
> > -cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
> > +cc-option = $(shell if $(CC) -Werror $(1) -S -o /dev/null -xc /dev/null \
> >                 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
> >
> >   COMMON_CFLAGS += -g $(autodepend-flags)
> > -COMMON_CFLAGS += -Wall -Wwrite-strings -Wclobbered -Wempty-body -Wuninitialized
> > -COMMON_CFLAGS += -Wignored-qualifiers -Wunused-but-set-parameter
> > -COMMON_CFLAGS += -Werror
> > +COMMON_CFLAGS += -Wall -Wwrite-strings -Wempty-body -Wuninitialized
> > +COMMON_CFLAGS += -Wignored-qualifiers -Werror
> > +
> >   frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
> >   fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
> >   fnostack_protector := $(call cc-option, -fno-stack-protector, "")
> > @@ -60,16 +60,20 @@ fnostack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
> >   wno_frame_address := $(call cc-option, -Wno-frame-address, "")
> >   fno_pic := $(call cc-option, -fno-pic, "")
> >   no_pie := $(call cc-option, -no-pie, "")
> > +wclobbered := $(call cc-option, -Wclobbered, "")
> > +wunused_but_set_parameter := $(call cc-option, -Wunused-but-set-parameter, "")
> > +
> >   COMMON_CFLAGS += $(fomit_frame_pointer)
> >   COMMON_CFLAGS += $(fno_stack_protector)
> >   COMMON_CFLAGS += $(fno_stack_protector_all)
> >   COMMON_CFLAGS += $(wno_frame_address)
> >   COMMON_CFLAGS += $(if $(U32_LONG_FMT),-D__U32_LONG_FMT__,)
> >   COMMON_CFLAGS += $(fno_pic) $(no_pie)
> > +COMMON_CFLAGS += $(wclobbered)
> > +COMMON_CFLAGS += $(wunused_but_set_parameter)
>
> Looks good to me up to this point here...
>
> >   CFLAGS += $(COMMON_CFLAGS)
> > -CFLAGS += -Wmissing-parameter-type -Wold-style-declaration -Woverride-init
> > -CFLAGS += -Wmissing-prototypes -Wstrict-prototypes
> > +CFLAGS += -Woverride-init -Wmissing-prototypes -Wstrict-prototypes
>
> ... but I think this hunk rather belongs to the next patch instead?
>
>   Thomas
>

  reply	other threads:[~2019-11-08 20:36 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 18:35 [kvm-unit-tests PATCH 0/3] Patches for clang compilation Bill Wendling
2019-10-10 18:35 ` [kvm-unit-tests PATCH 1/3] x86: emulator: use "SSE2" for the target Bill Wendling
2019-10-10 18:35 ` [kvm-unit-tests PATCH 2/3] pci: use uint64_t for unsigned long values Bill Wendling
2019-10-11  9:12   ` Alexandru Elisei
2019-10-12  8:26     ` [kvm-unit-tests PATCH 1/1] " Bill Wendling
2019-10-14 16:33       ` Alexandru Elisei
2019-10-14 16:36       ` Sean Christopherson
2019-10-10 18:35 ` [kvm-unit-tests PATCH 3/3] Makefile: use "-Werror" in cc-option Bill Wendling
2019-10-15  7:29   ` Thomas Huth
2019-10-15  7:57     ` Bill Wendling
2019-10-15  8:12       ` Thomas Huth
2019-10-14 19:24 ` [kvm-unit-tests PATCH 0/4] Patches for clang compilation Bill Wendling
2019-10-14 19:24   ` [kvm-unit-tests PATCH 1/4] x86: emulator: use "SSE2" for the target Bill Wendling
2019-10-14 19:24   ` [kvm-unit-tests PATCH 2/4] pci: cast the masks to the appropriate size Bill Wendling
2019-10-14 19:24   ` [kvm-unit-tests PATCH 3/4] Makefile: use "-Werror" in cc-option Bill Wendling
2019-10-14 19:24   ` [kvm-unit-tests PATCH 4/4] Makefile: add "cxx-option" for C++ builds Bill Wendling
2019-10-14 19:25   ` [kvm-unit-tests PATCH 0/4] Patches for clang compilation Bill Wendling
2019-10-14 23:56     ` Nadav Amit
2019-10-15  0:04       ` Bill Wendling
2019-10-15  0:04 ` [kvm-unit-tests PATCH v2 " Bill Wendling
2019-10-15  0:04   ` [kvm-unit-tests PATCH v2 1/4] x86: emulator: use "SSE2" for the target Bill Wendling
2019-10-15  0:04   ` [kvm-unit-tests PATCH v2 2/4] pci: cast the masks to the appropriate size Bill Wendling
2019-10-15  0:04   ` [kvm-unit-tests PATCH v2 3/4] Makefile: use "-Werror" in cc-option Bill Wendling
2019-10-15  0:04   ` [kvm-unit-tests PATCH v2 4/4] Makefile: add "cxx-option" for C++ builds Bill Wendling
2019-10-30 21:04   ` [kvm-unit-tests PATCH v3 0/6] Patches for clang compilation Bill Wendling
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 1/6] x86: emulator: use "SSE2" for the target Bill Wendling
2019-11-28  7:31       ` Thomas Huth
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 2/6] pci: cast the masks to the appropriate size Bill Wendling
2019-11-08  8:39       ` Thomas Huth
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 3/6] Makefile: use "-Werror" in cc-option Bill Wendling
2019-11-08  8:43       ` Thomas Huth
2019-11-08 20:36         ` Bill Wendling [this message]
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 4/6] Makefile: add "cxx-option" for C++ builds Bill Wendling
2019-11-08  8:48       ` Thomas Huth
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 5/6] x86: use a non-negative number in shift Bill Wendling
2019-11-08  8:31       ` Thomas Huth
2019-10-30 21:04     ` [kvm-unit-tests PATCH v3 6/6] x86: use inline asm to retrieve stack pointer Bill Wendling

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='CAGG=3QXgCseTiZ-5qeUqwE6L4E8DxNr8nbthacgH-BAQCn6e3g@mail.gmail.com' \
    --to=morbo@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.