For most of libraries, in perf.config, they can be recorded with
-DHAVE_XXX or -DNO_XXX in CFLAGS according to if they are compiled-in.
Then C code could know if the library is compiled-in or not.

While for glibc, no existing -DHAVE_XXX or -DNO_XXX.

This patch adds -DNO_GLIBC to CFLAGS.

Signed-off-by: Jin Yao <yao....@linux.intel.com>
---
 tools/perf/Makefile.config | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 98ff736..5883dd6 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -324,6 +324,8 @@ else
       NO_LIBBPF := 1
       NO_JVMTI := 1
     else
+      CFLAGS += -DNO_GLIBC
+
       ifneq ($(filter s% -static%,$(LDFLAGS),),)
         msg := $(error No static glibc found, please install glibc-static);
       else
-- 
2.7.4

Reply via email to