perf_counter tools: Build with native optimization
Commit-ID: af794b94ae8a16fb4a9da6ce640c122efb44e2a0 Gitweb: http://git.kernel.org/tip/af794b94ae8a16fb4a9da6ce640c122efb44e2a0 Author: Ingo Molnar <[email protected]> AuthorDate: Thu, 4 Jun 2009 13:58:13 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 4 Jun 2009 14:00:52 +0200
perf_counter tools: Build with native optimization
Build the tools with -march=native by default.
No measurable difference in speed though, compared to the default, on a Nehalem testbox.
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Thomas Gleixner <[email protected]>
LKML-Reference: <new-submission>
--- Documentation/perf_counter/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/perf_counter/Makefile +1 -1
@@ -159,7 +159,7 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') # CFLAGS and LDFLAGS are for the users to override from the command line. -CFLAGS = -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 +CFLAGS = -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 -march=native LDFLAGS = -lpthread -lrt -lelf ALL_CFLAGS = $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS)
Quoted 3 lines · tip-bot for Ingo Molnar
perf_countertools: Build with native optimizationBuild the tools with -march=native by default.
On powerpc (RHEL5.2 on POWER5+, gcc 4.1.2), I get:
CC perf.o
cc1: error: unrecognized command line option "-march=native"
make: *** [perf.o] Error 1
Is there a way to make the default CFLAGS depend on the architecture? We need -m64 on powerpc as well.
Paul.
Quoted 11 lines · Paul Mackerras
Quoted 3 lines · tip-bot for Ingo Molnar
perf_countertools: Build with native optimizationBuild the tools with -march=native by default.
On powerpc (RHEL5.2 on POWER5+, gcc 4.1.2), I get:
CC perf.o
cc1: error: unrecognized command line option "-march=native"
make: *** [perf.o] Error 1
ok, i removed that.
Quoted 2 lines
Is there a way to make the default CFLAGS depend on the architecture? We need -m64 on powerpc as well.
Would be nice to add a Makefile rule to add -m64 on all 64-bit architectures. That would avoid having to do PowerPC-specific magic.
(But, PowerPC-specific rules would be fine too, of course.)
Ingo