mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 06:20:50 +07:00
tools/perf/build: Split out feature check: 'libelf'
Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-qznhihaasbysfqO7ffvRsf9q@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
50eed7a71e
commit
8f7f8005f5
@ -108,6 +108,7 @@ FEATURE_TESTS = \
|
||||
volatile-register-var \
|
||||
fortify-source \
|
||||
bionic \
|
||||
libelf \
|
||||
libnuma
|
||||
|
||||
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
|
||||
@ -164,8 +165,7 @@ ifdef NO_LIBELF
|
||||
NO_DEMANGLE := 1
|
||||
NO_LIBUNWIND := 1
|
||||
else
|
||||
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
|
||||
ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
|
||||
ifeq ($(feature-libelf), 0)
|
||||
FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS)
|
||||
ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
|
||||
LIBC_SUPPORT := 1
|
||||
|
@ -6,6 +6,7 @@ FILES= \
|
||||
test-volatile-register-var \
|
||||
test-fortify-source \
|
||||
test-bionic \
|
||||
test-libelf \
|
||||
test-libnuma
|
||||
|
||||
CC := $(CC) -MD
|
||||
@ -34,6 +35,9 @@ test-fortify-source:
|
||||
test-bionic:
|
||||
$(BUILD)
|
||||
|
||||
test-libelf:
|
||||
$(BUILD) -lelf
|
||||
|
||||
test-libnuma:
|
||||
$(BUILD) -lnuma
|
||||
|
||||
|
7
tools/perf/config/feature-checks/test-libelf.c
Normal file
7
tools/perf/config/feature-checks/test-libelf.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <libelf.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
Elf *elf = elf_begin(0, ELF_C_READ, 0);
|
||||
return (long)elf;
|
||||
}
|
Loading…
Reference in New Issue
Block a user