mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tools build: Add test for sched_getcpu()
Instead of trying to go on adding more ifdef conditions, do a feature test and define HAVE_SCHED_GETCPU_SUPPORT instead, then use it to provide the prototype. No need to change the stub, as it is already a __weak symbol. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
e3ba76deef
commit
120010cb1e
7 changed files with 24 additions and 9 deletions
|
|
@ -317,6 +317,10 @@ ifdef NO_DWARF
|
|||
NO_LIBDW_DWARF_UNWIND := 1
|
||||
endif
|
||||
|
||||
ifeq ($(feature-sched_getcpu), 1)
|
||||
CFLAGS += -DHAVE_SCHED_GETCPU_SUPPORT
|
||||
endif
|
||||
|
||||
ifndef NO_LIBELF
|
||||
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
||||
EXTLIBS += -lelf
|
||||
|
|
|
|||
|
|
@ -3,10 +3,4 @@
|
|||
|
||||
unsigned long perf_event_open_cloexec_flag(void);
|
||||
|
||||
#ifdef __GLIBC_PREREQ
|
||||
#if !__GLIBC_PREREQ(2, 6) && !defined(__UCLIBC__)
|
||||
int sched_getcpu(void) __THROW;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __PERF_CLOEXEC_H */
|
||||
|
|
|
|||
|
|
@ -355,8 +355,8 @@ void print_binary(unsigned char *data, size_t len,
|
|||
size_t bytes_per_line, print_binary_t printer,
|
||||
void *extra);
|
||||
|
||||
#if !defined(__GLIBC__) && !defined(__ANDROID__)
|
||||
extern int sched_getcpu(void);
|
||||
#ifndef HAVE_SCHED_GETCPU_SUPPORT
|
||||
int sched_getcpu(void);
|
||||
#endif
|
||||
|
||||
int is_printable_array(char *p, unsigned int len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue