lkml.org 
[lkml]   [2010]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf build fixes for opensuse 10.0
From
On Wed, Sep 22, 2010 at 11:03 AM, Andi Kleen <andi@firstfloor.org> wrote:
> Fix the perf Makefile to 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?

> Also remove warning options that are not supported in older compilers.

I can get on-board with the above though.

> And fix a missing include for __always_inline.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 4f1fa77..1bf4d9c 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -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)
> diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h
> index bb4ac2e..305f1c2 100644
> --- a/tools/perf/util/include/linux/bitops.h
> +++ b/tools/perf/util/include/linux/bitops.h
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-22 12:51    [from the cache]
©2003-2011 Jasper Spaans