summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-21 12:23:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-11 16:59:18 +0100
commit9169daddaac3b4a835f294af2802ac3a67ca713e (patch)
tree03f90c8af7eecb01593ae8222313ac6d9a1b18ae /meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
parent1335c252a8037d39157eff8bd7e44e6c837764f9 (diff)
downloadpoky-9169daddaac3b4a835f294af2802ac3a67ca713e.tar.gz
valgrind: Fix arm build with gcc7
Add function to remove -mcpu compiler options on arm (From OE-Core rev: 6a053573dc4e6c7490e0e86fd043e425ea85f12c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind_3.12.0.bb')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.12.0.bb14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index 62a96354cd..d5a8dda487 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -23,7 +23,8 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
23 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ 23 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
24 file://avoid-neon-for-targets-which-don-t-support-it.patch \ 24 file://avoid-neon-for-targets-which-don-t-support-it.patch \
25 file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ 25 file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
26" 26 file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \
27 "
27SRC_URI_append_libc-musl = "\ 28SRC_URI_append_libc-musl = "\
28 file://0001-fix-build-for-musl-targets.patch \ 29 file://0001-fix-build-for-musl-targets.patch \
29" 30"
@@ -53,6 +54,7 @@ EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEIN
53 54
54# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option 55# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
55EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" 56EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
57TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}"
56 58
57EXTRA_OEMAKE = "-w" 59EXTRA_OEMAKE = "-w"
58 60
@@ -66,10 +68,20 @@ SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
66 68
67CFLAGS_append_libc-uclibc = " -D__UCLIBC__ " 69CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
68 70
71def get_mcpu(d):
72 for arg in (d.getVar('TUNE_CCARGS') or '').split():
73 if arg.startswith('-mcpu='):
74 return arg
75 else:
76 continue
77 return ""
78
69do_install_append () { 79do_install_append () {
70 install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ 80 install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
71} 81}
72 82
83TUNE = "${@strip_mcpu(d)}"
84
73RDEPENDS_${PN} += "perl" 85RDEPENDS_${PN} += "perl"
74 86
75# valgrind needs debug information for ld.so at runtime in order to 87# valgrind needs debug information for ld.so at runtime in order to