Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e2d4d0e authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Clean up libelf feature support code



Current EXTLIBS contains -lelf by default and removes it when libelf is
not detected.

This is little bit confusing since we can now build perf without libelf
so there's no need to handle it differently than other libraries.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1415337606-2186-3-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 73c5d224
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -497,8 +497,6 @@ ifneq ($(OUTPUT),)
endif
endif


ifdef NO_LIBELF
ifdef NO_LIBELF
EXTLIBS := $(filter-out -lelf,$(EXTLIBS))

# Remove ELF/DWARF dependent codes
# Remove ELF/DWARF dependent codes
LIB_OBJS := $(filter-out $(OUTPUT)util/symbol-elf.o,$(LIB_OBJS))
LIB_OBJS := $(filter-out $(OUTPUT)util/symbol-elf.o,$(LIB_OBJS))
LIB_OBJS := $(filter-out $(OUTPUT)util/dwarf-aux.o,$(LIB_OBJS))
LIB_OBJS := $(filter-out $(OUTPUT)util/dwarf-aux.o,$(LIB_OBJS))
+3 −2
Original line number Original line Diff line number Diff line
@@ -150,7 +150,7 @@ CFLAGS += -std=gnu99
# adding assembler files missing the .GNU-stack linker note.
# adding assembler files missing the .GNU-stack linker note.
LDFLAGS += -Wl,-z,noexecstack
LDFLAGS += -Wl,-z,noexecstack


EXTLIBS = -lelf -lpthread -lrt -lm -ldl
EXTLIBS = -lpthread -lrt -lm -ldl


ifneq ($(OUTPUT),)
ifneq ($(OUTPUT),)
  OUTPUT_FEATURES = $(OUTPUT)config/feature-checks/
  OUTPUT_FEATURES = $(OUTPUT)config/feature-checks/
@@ -354,6 +354,7 @@ endif # NO_LIBELF


ifndef NO_LIBELF
ifndef NO_LIBELF
  CFLAGS += -DHAVE_LIBELF_SUPPORT
  CFLAGS += -DHAVE_LIBELF_SUPPORT
  EXTLIBS += -lelf


  ifeq ($(feature-libelf-mmap), 1)
  ifeq ($(feature-libelf-mmap), 1)
    CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
    CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT
@@ -373,7 +374,7 @@ ifndef NO_LIBELF
    else
    else
      CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
      CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
      LDFLAGS += $(LIBDW_LDFLAGS)
      LDFLAGS += $(LIBDW_LDFLAGS)
      EXTLIBS += -lelf -ldw
      EXTLIBS += -ldw
    endif # PERF_HAVE_DWARF_REGS
    endif # PERF_HAVE_DWARF_REGS
  endif # NO_DWARF
  endif # NO_DWARF
endif # NO_LIBELF
endif # NO_LIBELF