Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755169AbbHFHEt (ORCPT ); Thu, 6 Aug 2015 03:04:49 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56008 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754658AbbHFHEq (ORCPT ); Thu, 6 Aug 2015 03:04:46 -0400 Date: Thu, 6 Aug 2015 00:04:20 -0700 From: tip-bot for Petri Gynther Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, a.p.zijlstra@chello.nl, pgynther@google.com, tglx@linutronix.de, acme@redhat.com, hpa@zytor.com Reply-To: acme@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, pgynther@google.com, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1438735081-24131-1-git-send-email-pgynther@google.com> References: <1438735081-24131-1-git-send-email-pgynther@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Fix build errors with mipsel-linux-uclibc compiler Git-Commit-ID: f151f53aa4f54a647353e1935e4c6cef7f094dd4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2715 Lines: 88 Commit-ID: f151f53aa4f54a647353e1935e4c6cef7f094dd4 Gitweb: http://git.kernel.org/tip/f151f53aa4f54a647353e1935e4c6cef7f094dd4 Author: Petri Gynther AuthorDate: Tue, 4 Aug 2015 17:38:01 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 5 Aug 2015 16:56:16 -0300 perf tools: Fix build errors with mipsel-linux-uclibc compiler linux/tools$ make ARCH=mips CROSS_COMPILE=mipsel-linux- perf ... config/Makefile:256: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. make[1]: *** [all] Error 2 make: *** [perf] Error 2 ... In file included from builtin-sched.c:13:0: util/cloexec.h:8:12: error: redundant redeclaration of ‘sched_getcpu’ [-Werror=redundant-decls] extern int sched_getcpu(void) __THROW; mipsel-buildroot-linux-uclibc/sysroot/usr/include/bits/sched.h:88:12: note: previous declaration of ‘sched_getcpu’ was here extern int sched_getcpu (void) __THROW; uclibc info: sysroot/usr/include/bits/uClibc_config.h __UCLIBC_MAJOR__ 0 __UCLIBC_MINOR__ 9 __UCLIBC_SUBLEVEL__ 33 sysroot/usr/include/features.h __UCLIBC__ 1 __GLIBC__ 2 __GLIBC_MINOR__ 2 Signed-off-by: Petri Gynther Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1438735081-24131-1-git-send-email-pgynther@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/feature/test-glibc.c | 11 +++++++++++ tools/perf/util/cloexec.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/build/feature/test-glibc.c b/tools/build/feature/test-glibc.c index b082034..9367f75 100644 --- a/tools/build/feature/test-glibc.c +++ b/tools/build/feature/test-glibc.c @@ -1,8 +1,19 @@ +#include + +#if !defined(__UCLIBC__) #include +#else +#define XSTR(s) STR(s) +#define STR(s) #s +#endif int main(void) { +#if !defined(__UCLIBC__) const char *version = gnu_get_libc_version(); +#else + const char *version = XSTR(__GLIBC__) "." XSTR(__GLIBC_MINOR__); +#endif return (long)version; } diff --git a/tools/perf/util/cloexec.h b/tools/perf/util/cloexec.h index 68888c2..3bee677 100644 --- a/tools/perf/util/cloexec.h +++ b/tools/perf/util/cloexec.h @@ -4,7 +4,7 @@ unsigned long perf_event_open_cloexec_flag(void); #ifdef __GLIBC_PREREQ -#if !__GLIBC_PREREQ(2, 6) +#if !__GLIBC_PREREQ(2, 6) && !defined(__UCLIBC__) extern int sched_getcpu(void) __THROW; #endif #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/