Skip to content

Commit f9ca2d8

Browse files
committed
perf tools: Emit more precise message for missing glibc static library
When the user does: make -C tools/perf LDFLAGS=-static asking for a static build, and the glibc-static (or equivalent) is not found, the message wasn't clear, stating that one of glibc-devel or glibc-static wasn't installed, clarify it checking if -static is present in LDFLAGS. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-7e0sfobbzgeydzi9gsz8ss3m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 82b8977 commit f9ca2d8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎tools/perf/config/Makefile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,11 @@ else
299299
NO_LIBUNWIND := 1
300300
NO_LIBDW_DWARF_UNWIND := 1
301301
else
302-
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
302+
ifneq ($(filter s% -static%,$(LDFLAGS),),)
303+
msg := $(error No static glibc found, please install glibc-static);
304+
else
305+
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]);
306+
endif
303307
endif
304308
else
305309
ifndef NO_LIBDW_DWARF_UNWIND

0 commit comments

Comments
 (0)