Skip to contentSkip to conversation

perf build: Lower the priority of tools/lib includes

PATCH In review Ian Rogers 2 participants 4 messages Jan 6, 2022 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf build: Lower the priority of tools/lib includes

tools/lib has a 1.1.0 copy of libtraceevent. If a newer system version is installed then its headers will go in /usr/include. As -I has priority over system headers the 1.1.0 version gets used in preference to the system one, which isn't what is wanted. To make the behavior match expectations use -idirafter so that any system headers have priority over the tools/lib version.

Fixes 08efcb4a638d ("libtraceevent: Increase libtraceevent logging when verbose")
---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
index 96ad944ca6a8..0627286380fa 100644
@@ -346,7 +346,7 @@ endif
 
 INC_FLAGS += -I$(src-perf)/util
 INC_FLAGS += -I$(src-perf)
-INC_FLAGS += -I$(srctree)/tools/lib/
+INC_FLAGS += -idirafter$(srctree)/tools/lib/
 
 CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#1 lore raw

Em Wed, Jan 05, 2022 at 11:26:27PM -0800, Ian Rogers escreveu:

Quoted 8 lines

tools/lib has a 1.1.0 copy of libtraceevent. If a newer system version is installed then its headers will go in /usr/include. As -I has priority over system headers the 1.1.0 version gets used in preference to the system one, which isn't what is wanted. To make the behavior match expectations use -idirafter so that any system headers have priority over the tools/lib version.

Fixes 08efcb4a638d ("libtraceevent: Increase libtraceevent logging when verbose")

Hi,

You forgot to add your Signed-off-by:, I'm adding it as you
usually provide it, ok?

- Arnaldo

Quoted 19 lines
---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
index 96ad944ca6a8..0627286380fa 100644
@@ -346,7 +346,7 @@ endif
 
 INC_FLAGS += -I$(src-perf)/util
 INC_FLAGS += -I$(src-perf)
-INC_FLAGS += -I$(srctree)/tools/lib/
+INC_FLAGS += -idirafter$(srctree)/tools/lib/
 
 CORE_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
Signature · 1 line
- Arnaldo
#2 lore raw

Em Thu, Jan 06, 2022 at 04:28:58PM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 8 lines

Em Wed, Jan 05, 2022 at 11:26:27PM -0800, Ian Rogers escreveu:

Quoted 7 lines

tools/lib has a 1.1.0 copy of libtraceevent. If a newer system version is installed then its headers will go in /usr/include. As -I has priority over system headers the 1.1.0 version gets used in preference to the system one, which isn't what is wanted. To make the behavior match expectations use -idirafter so that any system headers have priority over the tools/lib version.

Quoted 6 lines
Quoted 1 line
Fixes 08efcb4a638d ("libtraceevent: Increase libtraceevent logging when verbose")

Hi,

You forgot to add your Signed-off-by:, I'm adding it as you
usually provide it, ok?

Also adding:

- Arnaldo

author reviewer
#3 lore raw
Quoted 14 lines · Arnaldo Carvalho de Melo

Em Thu, Jan 06, 2022 at 04:28:58PM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 12 lines

Em Wed, Jan 05, 2022 at 11:26:27PM -0800, Ian Rogers escreveu:

Quoted 8 lines

tools/lib has a 1.1.0 copy of libtraceevent. If a newer system version is installed then its headers will go in /usr/include. As -I has priority over system headers the 1.1.0 version gets used in preference to the system one, which isn't what is wanted. To make the behavior match expectations use -idirafter so that any system headers have priority over the tools/lib version.

Fixes 08efcb4a638d ("libtraceevent: Increase libtraceevent logging when verbose")

Hi,

Quoted 8 lines
Quoted 2 lines

You forgot to add your Signed-off-by:, I'm adding it as you
usually provide it, ok?

Also adding:

- Arnaldo

Thanks Arnaldo! Both good with me.

Ian