perf build fixes for opensuse 10.0
PATCH 1/1 perf build fixes for opensuse 10.0
Fix the perf Makefile to compile on opensuse 10.0
-Werror in shipping code is usually a bad idea. Remove that. Also remove warning options that are not supported in older compilers. And fix a missing include for __always_inline.
tools/perf/Makefile +3 -3
@@ -201,13 +201,13 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wshadow EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Winit-self EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wpacked EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wredundant-decls -EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protector +#EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protector EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-aliasing=3 EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-default EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wswitch-enum EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wno-system-headers EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wundef -EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wvolatile-register-var +#EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wvolatile-register-var EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wwrite-strings EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wbad-function-cast EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wmissing-declarations
@@ -224,7 +224,7 @@ ifndef PERF_DEBUG CFLAGS_OPTIMIZE = -O6 endif -CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) +CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) EXTLIBS = -lpthread -lrt -lelf -lm ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ALL_LDFLAGS = $(LDFLAGS)
tools/perf/util/include/linux/bitops.h +1 -0
@@ -2,6 +2,7 @@#define _PERF_LINUX_BITOPS_H_#include <linux/kernel.h> +#include <linux/compiler.h> #include <asm/hweight.h> #define BITS_PER_LONG __WORDSIZE
Quoted 3 lines · Andi Kleen
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that.
Why not remove it then when you ship the code, but leave it in the kernel where it is useful?
Quoted 1 line
Also remove warning options that are not supported in older compilers.
I can get on-board with the above though.
Quoted 51 lines
And fix a missing include for
__always_inline.Signed-off-by Andi Kleen <[email protected]>tools/perf/Makefile +0
-0@@ -201,13 +201,13 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -WshadowEXTRA_WARNINGS := $(EXTRA_WARNINGS) -Winit-self
EXTRA_WARNINGS:= $(EXTRA_WARNINGS) -WpackedEXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wredundant-declstools/perf/Makefile +1
-1-EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protector +#EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protectorEXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-aliasing=3
EXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wswitch-defaultEXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wswitch-enumEXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wno-system-headersEXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wundeftools/perf/Makefile +1
-1-EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wvolatile-register-var +#EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wvolatile-register-varEXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wwrite-strings
EXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wbad-function-castEXTRA_WARNINGS:= $(EXTRA_WARNINGS) -Wmissing-declarationstools/perf/Makefile +0
-0@@ -224,7 +224,7 @@ ifndef PERF_DEBUG
CFLAGS_OPTIMIZE= -O6
endiftools/perf/Makefile +1
-1-CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) +CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)EXTLIBS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64ALL_LDFLAGS= $(LDFLAGS)tools/perf/util/include/linux/bitops.h +1
-1@@ -2,6 +2,7 @@ #define _PERF_LINUX_BITOPS_H_ #include <linux/kernel.h> +#include <linux/compiler.h> #include <asm/hweight.h> #define BITS_PER_LONG __WORDSIZE --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Andi Kleen
Quoted 3 lines
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that.
Why not remove it then when you ship the code, but leave it in the kernel where it is useful?
What do you mean with "you ship"?
I downloaded a kernel from kernel.org, it shipped to me and didn't build.
People can enable -Werror in their private source dirs, but it shouldn't be in any downloadable tarball or git.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 7 lines · Andi Kleen
Quoted 3 lines
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that.
Why not remove it then when you ship the code, but leave it in the kernel where it is useful?
What do you mean with "you ship"?
The subject of your email is "perf build fixes for opensuse 10.0" So, I inferred from there.
Quoted 2 lines
I downloaded a kernel from kernel.org, it shipped to me and didn't build.
Any reason you can't fix the build errors instead? Btw, I just tried building the lastest perf in tip/master and I had no problems.
Quoted 4 lines
People can enable -Werror in their private source dirs, but it shouldn't be in any downloadable tarball or git.
Quoted 6 lines · John Kacur
Quoted 5 lines · Andi Kleen
Quoted 5 lines · Andi Kleen
Quoted 3 lines
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Why not remove it then when you ship the code, but leave it in the kernel where it is useful?
What do you mean with "you ship"?
The subject of your email is "perf build fixes for opensuse 10.0" So, I inferred from there.
You inferred wrong. That was just using it on opensuse 10.0
(opensuse 10.0 has already shipped a very long time ago, it's really old by now)
Quoted 5 lines
Quoted 3 lines
I downloaded a kernel from kernel.org, it shipped to me and didn't build.
Any reason you can't fix the build errors instead?
That's what I did -- and then sent the patch.
Quoted 2 lines
Btw, I just tried building the lastest perf in tip/master and I had no problems.
Because you're not using opensuse 10.0
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Quoted 11 lines · John Kacur
Quoted 9 lines · Andi Kleen
Quoted 7 lines · Andi Kleen
Quoted 3 lines
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that.
Why not remove it then when you ship the code, but leave it in the kernel where it is useful?
What do you mean with "you ship"?
Quoted 7 lines
The subject of your email is "perf build fixes for opensuse 10.0" So, I inferred from there.
Quoted 2 lines
I downloaded a kernel from kernel.org, it shipped to me and didn't build.
Any reason you can't fix the build errors instead?
Well, it's Andi - he has a well established track record for picking the worst possible solution for pretty much anything and then being passive-agressive difficult about it as if there was no tomorrow. It's typically quite time-consuming for everyone involved, with little productive output. YMMV.
Here he could have done a dozen things to make his posting more useful:
he could have included the build warnings in the changelog (he didnt), he could have tried to address them (he didnt), he could have argued for some specific warnings to be disabled on specific, well-established grounds, for example demonstrating that it _only_ produces false positives (he didnt) - etc. etc. He did none of those things.
Thanks,
Ingo
Ingo Molnar
NAKQuoted 5 lines · Andi Kleen
Fix the perf
Makefileto compile on opensuse 10.0-Werror in shipping code is usually a bad idea. Remove that. Also remove warning options that are not supported in older compilers. And fix a missing include for
__always_inline.
NAK, for obvious reasons.
Please send patches that fix those warnings instead. Yes, some will be false positives - but quite a few will point to problems we want to address.
Thanks,
Ingo