[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425396581-17716-3-git-send-email-jolsa@kernel.org>
Date: Tue, 3 Mar 2015 16:29:29 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Stephane Eranian <eranian@...gle.com>
Subject: [PATCH 02/14] perf tools: Add feature check for lzma library
Will be used to decompress 'xz' objects. The check detects
the liblzma.so devel library normally delivered by xz package.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
---
tools/perf/config/Makefile | 6 ++++--
tools/perf/config/feature-checks/Makefile | 6 +++++-
tools/perf/config/feature-checks/test-lzma.c | 10 ++++++++++
3 files changed, 19 insertions(+), 3 deletions(-)
create mode 100644 tools/perf/config/feature-checks/test-lzma.c
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index d44c64d64465..d77bcea691dd 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -228,7 +228,8 @@ CORE_FEATURE_TESTS = \
timerfd \
libdw-dwarf-unwind \
libbabeltrace \
- zlib
+ zlib \
+ lzma
LIB_FEATURE_TESTS = \
dwarf \
@@ -244,7 +245,8 @@ LIB_FEATURE_TESTS = \
libunwind \
libdw-dwarf-unwind \
libbabeltrace \
- zlib
+ zlib \
+ lzma
VF_FEATURE_TESTS = \
backtrace \
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 8fe067864957..f7b1b7934782 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -32,7 +32,8 @@ FILES= \
test-libbabeltrace.bin \
test-compile-32.bin \
test-compile-x32.bin \
- test-zlib.bin
+ test-zlib.bin \
+ test-lzma.bin
CC := $(CROSS_COMPILE)gcc -MD
PKG_CONFIG := $(CROSS_COMPILE)pkg-config
@@ -151,6 +152,9 @@ test-compile-x32.bin:
test-zlib.bin:
$(BUILD) -lz
+test-lzma.bin:
+ $(BUILD) -llzma
+
-include *.d
###############################
diff --git a/tools/perf/config/feature-checks/test-lzma.c b/tools/perf/config/feature-checks/test-lzma.c
new file mode 100644
index 000000000000..95adc8ced3dd
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-lzma.c
@@ -0,0 +1,10 @@
+#include <lzma.h>
+
+int main(void)
+{
+ lzma_stream strm = LZMA_STREAM_INIT;
+ int ret;
+
+ ret = lzma_stream_decoder(&strm, UINT64_MAX, LZMA_CONCATENATED);
+ return ret ? -1 : 0;
+}
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists