Skip to content

Commit 8149a77

Browse files
committed
tools lib api: Add str_error_c to libapi
Because it uses that function, which would lead every tool using it to need to link against tools/lib/str_error_r.o. This fixes building tools/vm/, that links with libapi. Reported-by: Arjan van de Ven <arjan@linux.intel.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Fixes: b31e3e3 ("tools lib api fs: Use str_error_r()") Link: http://lkml.kernel.org/n/tip-aedt3qzibhnhaov2j4caqi61@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent e4b3e06 commit 8149a77

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎tools/lib/api/Build‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ libapi-y += fd/
22
libapi-y += fs/
33
libapi-y += cpu.o
44
libapi-y += debug.o
5+
libapi-y += str_error_r.o
6+
7+
$(OUTPUT)str_error_r.o: ../str_error_r.c FORCE
8+
$(call rule_mkdir)
9+
$(call if_changed_dep,cc_o_c)

‎tools/perf/util/Build‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ libperf-y += stat.o
7070
libperf-y += stat-shadow.o
7171
libperf-y += record.o
7272
libperf-y += srcline.o
73-
libperf-y += str_error_r.o
7473
libperf-y += data.o
7574
libperf-y += tsc.o
7675
libperf-y += cloexec.o
@@ -176,10 +175,6 @@ $(OUTPUT)util/libstring.o: ../lib/string.c FORCE
176175
$(call rule_mkdir)
177176
$(call if_changed_dep,cc_o_c)
178177

179-
$(OUTPUT)util/str_error_r.o: ../lib/str_error_r.c FORCE
180-
$(call rule_mkdir)
181-
$(call if_changed_dep,cc_o_c)
182-
183178
$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
184179
$(call rule_mkdir)
185180
$(call if_changed_dep,cc_o_c)

‎tools/perf/util/python-ext-sources‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ util/cpumap.c
1313
../lib/bitmap.c
1414
../lib/find_bit.c
1515
../lib/hweight.c
16-
../lib/str_error_r.c
1716
../lib/vsprintf.c
1817
util/thread_map.c
1918
util/util.c

0 commit comments

Comments
 (0)