Skip to contentSkip to conversation

perf tools: Allow to specify lib compile variable for spec usage

PATCH In review Jiri Olsa 3 participants 3 messages Aug 25, 2014 – Sep 19, 2014 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Allow to specify lib compile variable for spec usage

We need a way to specify $(lib) part of the installation path for traceevent plugin libraries. Currently we use 'lib64' for x86_64 and 'lib' otherwise.

Instead of listing all possible values, this change allows the rpm spec code to specify the correct $(lib) part based on processed architecture, like

  $ make ... lib=%{_lib}
Cc Kyle McMartin <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/config/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/config/Makefile +2 -0
index 75d4c237b03d..eaf36dafb482 100644
@@ -651,11 +651,13 @@ else
 sysconfdir = $(prefix)/etc
 ETC_PERFCONFIG = etc/perfconfig
 endif
+ifndef lib
 ifeq ($(IS_X86_64),1)
 lib = lib64
 else
 lib = lib
 endif
+endif # lib
 libdir = $(prefix)/$(lib)
 
 # Shell quote (do not use $(call) to accommodate ancient setups);
Signature · 1 line
1.8.3.1
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jiri Olsa

We need a way to specify $(lib) part of the installation path for traceevent plugin libraries. Currently we use 'lib64' for x86_64 and 'lib' otherwise.

Instead of listing all possible values, this change allows the rpm spec code to specify the correct $(lib) part based on processed architecture, like

  $ make ... lib=%{_lib}
Cc Kyle McMartin <[email protected]>

I had made a similar change to Fedora, which I replaced with this, and it worked fine.
LGTM :)

Quoted 34 lines
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/config/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/config/Makefile +2 -1
index 75d4c237b03d..eaf36dafb482 100644
@@ -651,11 +651,13 @@ else
 sysconfdir = $(prefix)/etc
 ETC_PERFCONFIG = etc/perfconfig
 endif
+ifndef lib
 ifeq ($(IS_X86_64),1)
 lib = lib64
 else
 lib = lib
 endif
+endif # lib
 libdir = $(prefix)/$(lib)
 
 # Shell quote (do not use $(call) to accommodate ancient setups);
--

1.8.3.1

#2 lore raw
In reply to Jiri Olsa
perf tools: Allow to specify lib compile variable for spec usage
Commit-ID:  6997af72e6c1e9d8c1cc511dc9485e9ee69a5e20
Gitweb:     http://git.kernel.org/tip/6997af72e6c1e9d8c1cc511dc9485e9ee69a5e20
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Aug 2014 16:55:52 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 17 Sep 2014 17:08:08 -0300

perf tools: Allow to specify lib compile variable for spec usage

We need a way to specify $(lib) part of the installation path for traceevent plugin libraries. Currently we use 'lib64' for x86_64 and 'lib' otherwise.

Instead of listing all possible values, this change allows the rpm spec code to specify the correct $(lib) part based on processed architecture, like

  $ make ... lib=%{_lib}
---
 tools/perf/config/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/config/Makefile +2 -0
index 98c9fd1..58f6091 100644
@@ -653,11 +653,13 @@ else
 sysconfdir = $(prefix)/etc
 ETC_PERFCONFIG = etc/perfconfig
 endif
+ifndef lib
 ifeq ($(IS_X86_64),1)
 lib = lib64
 else
 lib = lib
 endif
+endif # lib
 libdir = $(prefix)/$(lib)
 
 # Shell quote (do not use $(call) to accommodate ancient setups);