diff options
-rw-r--r-- | tools/perf/Makefile | 6 | ||||
-rw-r--r-- | tools/perf/perf.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 676302441e14..99b2bb371bcd 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -543,14 +543,12 @@ ifndef NO_LIBUNWIND | |||
543 | LIB_OBJS += $(OUTPUT)util/unwind.o | 543 | LIB_OBJS += $(OUTPUT)util/unwind.o |
544 | endif | 544 | endif |
545 | 545 | ||
546 | ifdef NO_LIBAUDIT | 546 | ifndef NO_LIBAUDIT |
547 | BASIC_CFLAGS += -DNO_LIBAUDIT_SUPPORT | ||
548 | else | ||
549 | FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit | 547 | FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit |
550 | ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT)),y) | 548 | ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT)),y) |
551 | msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); | 549 | msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); |
552 | BASIC_CFLAGS += -DNO_LIBAUDIT_SUPPORT | ||
553 | else | 550 | else |
551 | BASIC_CFLAGS += -DLIBAUDIT_SUPPORT | ||
554 | BUILTIN_OBJS += $(OUTPUT)builtin-trace.o | 552 | BUILTIN_OBJS += $(OUTPUT)builtin-trace.o |
555 | EXTLIBS += -laudit | 553 | EXTLIBS += -laudit |
556 | endif | 554 | endif |
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index dacae4b8bcb4..6d50eb0b4251 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -55,7 +55,7 @@ static struct cmd_struct commands[] = { | |||
55 | { "lock", cmd_lock, 0 }, | 55 | { "lock", cmd_lock, 0 }, |
56 | { "kvm", cmd_kvm, 0 }, | 56 | { "kvm", cmd_kvm, 0 }, |
57 | { "test", cmd_test, 0 }, | 57 | { "test", cmd_test, 0 }, |
58 | #ifndef NO_LIBAUDIT_SUPPORT | 58 | #ifdef LIBAUDIT_SUPPORT |
59 | { "trace", cmd_trace, 0 }, | 59 | { "trace", cmd_trace, 0 }, |
60 | #endif | 60 | #endif |
61 | { "inject", cmd_inject, 0 }, | 61 | { "inject", cmd_inject, 0 }, |