* [PATCH] Add -Werror to libkvm compile
@ 2008-03-24 18:44 Jerone Young
2008-03-24 19:42 ` [kvm-ppc-devel] " Segher Boessenkool
2008-03-24 20:28 ` Anthony Liguori
0 siblings, 2 replies; 7+ messages in thread
From: Jerone Young @ 2008-03-24 18:44 UTC (permalink / raw)
To: kvm-devel; +Cc: kvm-ppc-devel
# HG changeset patch
# User Jerone Young <jyoung5@us.ibm.com>
# Date 1206384205 18000
# Branch merge
# Node ID e23a26d1da04a6dbb831da7d03922abf95de7b30
# Parent 972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
Add -Werror to libkvm compile
This patch adds -Werror to CFLAGS for compilation of libkvm. This should stop complaints about Warnings.
Often I miss these warnings as they scroll right by with everything else during a big compile. This will help catch them.
For qemu this using -Werror is not possible as a lot of qemu throw a gcc warning of some sort.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
diff --git a/libkvm/Makefile b/libkvm/Makefile
--- a/libkvm/Makefile
+++ b/libkvm/Makefile
@@ -11,6 +11,7 @@ CFLAGS += $(call cc-option, -fno-stack-p
CFLAGS += $(call cc-option, -fno-stack-protector, "")
CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
CFLAGS += -I $(KERNELDIR)/include
+CFLAGS += -Werror
LDFLAGS += $(CFLAGS)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Add -Werror to libkvm compile
2008-03-24 18:44 [PATCH] Add -Werror to libkvm compile Jerone Young
@ 2008-03-24 19:42 ` Segher Boessenkool
2008-03-25 16:33 ` Jerone Young
2008-03-24 20:28 ` Anthony Liguori
1 sibling, 1 reply; 7+ messages in thread
From: Segher Boessenkool @ 2008-03-24 19:42 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-ppc-devel, kvm-devel
> This patch adds -Werror to CFLAGS for compilation of libkvm. This
> should stop complaints about Warnings.
Does libkvm build without warnings using GCC-4.3 (or even GCC-4.4)
on all supported platforms? If not, please fix that first :-)
Segher
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Add -Werror to libkvm compile
2008-03-24 19:42 ` [kvm-ppc-devel] " Segher Boessenkool
@ 2008-03-25 16:33 ` Jerone Young
2008-03-25 17:08 ` Avi Kivity
0 siblings, 1 reply; 7+ messages in thread
From: Jerone Young @ 2008-03-25 16:33 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: kvm-ppc-devel, kvm-devel
It does work with gcc 4.2.3 . Though no idea if gcc-4.3 & 4.4 would
workout. Though they should. I'll need to to compile them and give them
a try.
On Mon, 2008-03-24 at 20:42 +0100, Segher Boessenkool wrote:
> > This patch adds -Werror to CFLAGS for compilation of libkvm. This
> > should stop complaints about Warnings.
>
> Does libkvm build without warnings using GCC-4.3 (or even GCC-4.4)
> on all supported platforms? If not, please fix that first :-)
>
>
> Segher
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Add -Werror to libkvm compile
2008-03-25 16:33 ` Jerone Young
@ 2008-03-25 17:08 ` Avi Kivity
2008-03-25 19:09 ` Jerone Young
0 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2008-03-25 17:08 UTC (permalink / raw)
To: jyoung5; +Cc: kvm-ppc-devel, kvm-devel
Jerone Young wrote:
> It does work with gcc 4.2.3 . Though no idea if gcc-4.3 & 4.4 would
> workout. Though they should. I'll need to to compile them and give them
> a try.
>
While I'm a fan of -Werror, I have to agree with Anthony it can cause no
end of pain to users if they have a slightly different configuration.
Maybe enable it conditionally based on ./configure --developer as
Anthony suggests (but I'll forget to use it myself, I'm sure).
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Add -Werror to libkvm compile
2008-03-25 17:08 ` Avi Kivity
@ 2008-03-25 19:09 ` Jerone Young
2008-03-26 16:41 ` Avi Kivity
0 siblings, 1 reply; 7+ messages in thread
From: Jerone Young @ 2008-03-25 19:09 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-ppc-devel, kvm-devel
Yeah. This could "potentially" cause hell for users (non developers)
down the road. I'm just going to keep this patch in my queue for myself,
so no one will complain about warnings from my patches anymore.
I think having a --developer flag to configure could work, but we would
then need separate file for including the CFLAG, this would just clutter
things more.
On Tue, 2008-03-25 at 19:08 +0200, Avi Kivity wrote:
> Jerone Young wrote:
> > It does work with gcc 4.2.3 . Though no idea if gcc-4.3 & 4.4 would
> > workout. Though they should. I'll need to to compile them and give them
> > a try.
> >
>
> While I'm a fan of -Werror, I have to agree with Anthony it can cause no
> end of pain to users if they have a slightly different configuration.
>
> Maybe enable it conditionally based on ./configure --developer as
> Anthony suggests (but I'll forget to use it myself, I'm sure).
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Add -Werror to libkvm compile
2008-03-25 19:09 ` Jerone Young
@ 2008-03-26 16:41 ` Avi Kivity
0 siblings, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2008-03-26 16:41 UTC (permalink / raw)
To: jyoung5; +Cc: kvm-ppc-devel, kvm-devel
Jerone Young wrote:
> Yeah. This could "potentially" cause hell for users (non developers)
> down the road. I'm just going to keep this patch in my queue for myself,
> so no one will complain about warnings from my patches anymore.
>
> I think having a --developer flag to configure could work, but we would
> then need separate file for including the CFLAG, this would just clutter
> things more.
>
One other option is to enable -Werror by default, and have a
--disable-werror configure flag. It means we'll get better coverage,
but the user experience when it breaks will be worse.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add -Werror to libkvm compile
2008-03-24 18:44 [PATCH] Add -Werror to libkvm compile Jerone Young
2008-03-24 19:42 ` [kvm-ppc-devel] " Segher Boessenkool
@ 2008-03-24 20:28 ` Anthony Liguori
1 sibling, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2008-03-24 20:28 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel, kvm-ppc-devel
Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <jyoung5@us.ibm.com>
> # Date 1206384205 18000
> # Branch merge
> # Node ID e23a26d1da04a6dbb831da7d03922abf95de7b30
> # Parent 972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
> Add -Werror to libkvm compile
>
> This patch adds -Werror to CFLAGS for compilation of libkvm. This should stop complaints about Warnings.
>
What's unfortunate about -Werror is that GCC is notorious about
introducing warnings that aren't valid for particular versions of GCC.
While libkvm may compile with -Werror for you and may, there may be
existing (or future) versions of GCC that it won't build with whereas
the error being reported is not valid.
This is okay for developers, but not for users. In general, most
projects reserve -Werror for a developer or maintainer mode.
Regards,
Anthony Liguori
> Often I miss these warnings as they scroll right by with everything else during a big compile. This will help catch them.
>
> For qemu this using -Werror is not possible as a lot of qemu throw a gcc warning of some sort.
>
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> diff --git a/libkvm/Makefile b/libkvm/Makefile
> --- a/libkvm/Makefile
> +++ b/libkvm/Makefile
> @@ -11,6 +11,7 @@ CFLAGS += $(call cc-option, -fno-stack-p
> CFLAGS += $(call cc-option, -fno-stack-protector, "")
> CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
> CFLAGS += -I $(KERNELDIR)/include
> +CFLAGS += -Werror
>
> LDFLAGS += $(CFLAGS)
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-26 16:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-24 18:44 [PATCH] Add -Werror to libkvm compile Jerone Young
2008-03-24 19:42 ` [kvm-ppc-devel] " Segher Boessenkool
2008-03-25 16:33 ` Jerone Young
2008-03-25 17:08 ` Avi Kivity
2008-03-25 19:09 ` Jerone Young
2008-03-26 16:41 ` Avi Kivity
2008-03-24 20:28 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox