linux-next/tools/build
Leo Yan d557814cdf tools build: Add feature test for libelf with ZSTD
The macro ELFCOMPRESS_ZSTD defines the compress algorithm, which was
introduced in the commit ("libelf: Document and make ELFCOMPRESS_ZSTD
usable with old system elf.h") of the repository elfutils-0.188-67.
Therefore, libelf 0.189 and later versions require to link the libzstd
library.

Add a test for checking if libelf supports ZSTD algorithm.  Pass the
macro ELFCOMPRESS_ZSTD as an argument to the elf_compress() function.
If the build succeeds, it means the feature is supported.

Reviewed-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Tested-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Quentin Monnet <qmo@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Guilherme Amadio <amadio@gentoo.org>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Song Liu <song@kernel.org>
Cc: Stanislav Fomichev <sdf@google.com>
Cc: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20241215221223.293205-2-leo.yan@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-12-18 16:24:32 -03:00
..
Documentation tools build: Add CFLAGS_REMOVE_* support 2016-11-14 11:37:25 -03:00
feature tools build: Add feature test for libelf with ZSTD 2024-12-18 16:24:32 -03:00
tests License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Build.include tools build: Enable warnings through HOSTCFLAGS 2021-12-07 22:18:23 -03:00
fixdep.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile tools build: Provide consistent build options for fixdep 2024-08-15 18:08:17 -03:00
Makefile.build tools/build: Fix -s detection code in tools/build/Makefile.build 2023-10-18 15:29:35 -07:00
Makefile.feature tools build: Add feature test for libelf with ZSTD 2024-12-18 16:24:32 -03:00
Makefile.include tools build: Correct bpf fixdep dependencies 2024-08-05 12:19:48 -03:00