Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338873
b: refs/heads/master
c: d816ec2
h: refs/heads/master
i:
  338871: 1640c77
v: v3
  • Loading branch information
Irina Tirdea authored and Arnaldo Carvalho de Melo committed Oct 8, 2012
1 parent 7a3e6b4 commit 76e6e2a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78da39faf7c903bb6e3c20a726fde1bf98d10af8
refs/heads/master: d816ec2d1bea55cfeac373f0ab0ab8a3105e49b4
25 changes: 19 additions & 6 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__

-include config/feature-tests.mak

ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -fstack-protector-all),y)
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all),y)
CFLAGS := $(CFLAGS) -fstack-protector-all
endif

ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -Wstack-protector),y)
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wstack-protector),y)
CFLAGS := $(CFLAGS) -Wstack-protector
endif

ifeq ($(call try-cc,$(SOURCE_HELLO),-Werror -Wvolatile-register-var),y)
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var),y)
CFLAGS := $(CFLAGS) -Wvolatile-register-var
endif

Expand All @@ -172,6 +172,13 @@ endif
BASIC_CFLAGS = -Iutil/include -Iarch/$(ARCH)/include -I$(OUTPUT)util -I$(TRACE_EVENT_DIR) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
BASIC_LDFLAGS =

ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS)),y)
BIONIC := 1
EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
BASIC_CFLAGS += -I.
endif

# Guard against environment variables
BUILTIN_OBJS =
LIB_H =
Expand Down Expand Up @@ -469,12 +476,18 @@ else
FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y)
FLAGS_GLIBC=$(ALL_CFLAGS) $(ALL_LDFLAGS)
ifneq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC)),y)
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
else
ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC)),y)
LIBC_SUPPORT := 1
endif
ifeq ($(BIONIC),1)
LIBC_SUPPORT := 1
endif
ifeq ($(LIBC_SUPPORT),1)
NO_LIBELF := 1
NO_DWARF := 1
NO_DEMANGLE := 1
else
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
endif
else
FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS)
Expand Down
9 changes: 9 additions & 0 deletions trunk/tools/perf/config/feature-tests.mak
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ int main(void)
}
endef

define SOURCE_BIONIC
#include <android/api-level.h>

int main(void)
{
return __ANDROID_API__;
}
endef

define SOURCE_ELF_MMAP
#include <libelf.h>
int main(void)
Expand Down

0 comments on commit 76e6e2a

Please sign in to comment.