summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-10 10:05:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-10 17:35:15 +0100
commitee4f52e279ca0a252d8da987d7d327968839a9ff (patch)
tree7e29b7ac668cebe81cd860bafff06f2dd84bea9c
parent29665931b669963028acfd24cf066b8a5ee3ee4f (diff)
downloadpoky-ee4f52e279ca0a252d8da987d7d327968839a9ff.tar.gz
perf: Fix sysroot option to CC handling
If you build perf in tree /xxx/treea, then cleansstate perf and build it in /xxx/treeb having deleted treea, the build will fail, unable to find libc. The problem is that the --sysroot option passed in through CC is missing. This works fine if the default sysroot is ok, if it isn't, things will fail. In 1.7 we'll start poisoning the default sysroot in gcc to catch this kind of issue however that doesn't fix the problem with perf. The problem is that various Makefiles set CC = $(CROSS_COMPILE)gcc. The easist fix for now is to sed out the problematic Makefile lines. Its worth noting the tools/lib/traceevent Makefile has a much more funky way of setting CC which works for us and may be the way we need to fix the other Makefiles upstream. This fixes build failures we're occasionally seen on the autobuilders. (From OE-Core rev: d9bd1ac6d91de932dd3e2fcac9da77e0a7c09f55) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/perf/perf.bb12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 9dfccdfd60..ef21b6c9c2 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -133,6 +133,18 @@ do_configure_prepend () {
133 if [ -e "${S}/tools/perf/config/Makefile" ]; then 133 if [ -e "${S}/tools/perf/config/Makefile" ]; then
134 sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile 134 sed -i 's,libdir = $(prefix)/$(lib),libdir = $(prefix)/${baselib},' ${S}/tools/perf/config/Makefile
135 fi 135 fi
136 # We need to ensure the --sysroot option in CC is preserved
137 if [ -e "${S}/tools/perf/Makefile.perf" ]; then
138 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
139 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
140 fi
141 if [ -e "${S}/tools/lib/api/Makefile" ]; then
142 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
143 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
144 fi
145 if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
146 sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
147 fi
136} 148}
137 149
138python do_package_prepend() { 150python do_package_prepend() {