tools lib api: Add str_error_c to libapi
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 Jul 2016 20:09:17 +0000 (17:09 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 Jul 2016 20:16:43 +0000 (17:16 -0300)
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: b31e3e3316a7 ("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>
tools/lib/api/Build
tools/perf/util/Build
tools/perf/util/python-ext-sources

index 954c644f7ad9e5ee0f54bdf16cf2b68766f1e2a5..6e2373db5598ecdd2b603d5edce72c090f8a3cb6 100644 (file)
@@ -2,3 +2,8 @@ libapi-y += fd/
 libapi-y += fs/
 libapi-y += cpu.o
 libapi-y += debug.o
+libapi-y += str_error_r.o
+
+$(OUTPUT)str_error_r.o: ../str_error_r.c FORCE
+       $(call rule_mkdir)
+       $(call if_changed_dep,cc_o_c)
index 2fa7d8b6987314b0e6b1724eef627e22768b380a..91c5f6e1af59a23e23013f52d4058dca9825ff7c 100644 (file)
@@ -70,7 +70,6 @@ libperf-y += stat.o
 libperf-y += stat-shadow.o
 libperf-y += record.o
 libperf-y += srcline.o
-libperf-y += str_error_r.o
 libperf-y += data.o
 libperf-y += tsc.o
 libperf-y += cloexec.o
@@ -176,10 +175,6 @@ $(OUTPUT)util/libstring.o: ../lib/string.c FORCE
        $(call rule_mkdir)
        $(call if_changed_dep,cc_o_c)
 
-$(OUTPUT)util/str_error_r.o: ../lib/str_error_r.c FORCE
-       $(call rule_mkdir)
-       $(call if_changed_dep,cc_o_c)
-
 $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
        $(call rule_mkdir)
        $(call if_changed_dep,cc_o_c)
index 5065ec98049cfb65c75ade276c05fa19a7c7f0b1..b7d4f4aeee612f299915476222dfa7ec40aa430e 100644 (file)
@@ -13,7 +13,6 @@ util/cpumap.c
 ../lib/bitmap.c
 ../lib/find_bit.c
 ../lib/hweight.c
-../lib/str_error_r.c
 ../lib/vsprintf.c
 util/thread_map.c
 util/util.c