]> git.baikalelectronics.ru Git - kernel.git/commit
perf: tools: Fix cross building
authorMark Rutland <mark.rutland@arm.com>
Wed, 15 Jan 2014 10:44:08 +0000 (10:44 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Jan 2014 18:15:05 +0000 (15:15 -0300)
commit96d086ab21477b276357b10bfd5414986d1758f1
treee1fb04abcdba12be11b86729df2f8da1130eda60
parent54bf5c6514361fb9842fd526086064d9ce58cb06
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 <mark.rutland@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/r/1389782648-4417-4-git-send-email-mark.rutland@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf
tools/perf/config/Makefile
tools/perf/config/feature-checks/Makefile