From a8a5cd8b472ca20e5b8fa649c43b3756867322f8 Mon Sep 17 00:00:00 2001 From: Mark Rutland Date: Wed, 15 Jan 2014 10:44:08 +0000 Subject: perf: tools: Fix cross building Currently the feature-checks Makefile does not inherit $(CC), and calls cc rather than $(CROSS_COMPILE)gcc. Thus the feature checks invoke the native toolchain rather than the cross toolchain, and can identify features as available when they are not. This can break the build. Additionally the native pkg-config is always called as opposed to $(CROSS_COMPILE)pkg-config, so the wrong flags and paths may be passed to the cross compiler. This patch passes CROSS_COMPILE down to the feature-checks Makefile, and forces its use. Additionally pkg-config is replaced with $(CROSS_COMPILE)pkg-config via a new $(PKG_CONFIG) variable. This patch has been build tested on x86_64 and arm. Signed-off-by: Mark Rutland Cc: Ingo Molnar Cc: Jiri Olsa Cc: Will Deacon Link: http://lkml.kernel.org/r/1389782648-4417-4-git-send-email-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.perf | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/Makefile.perf') diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 87d7726cee2d..7257e7e9e38a 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -76,6 +76,7 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD CC = $(CROSS_COMPILE)gcc AR = $(CROSS_COMPILE)ar +PKG_CONFIG = $(CROSS_COMPILE)pkg-config RM = rm -f LN = ln -f -- cgit v1.2.3