summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch108
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.12.0.bb14
2 files changed, 121 insertions, 1 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
new file mode 100644
index 0000000000..9f1da7bac6
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch
@@ -0,0 +1,108 @@
1From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 20 Apr 2017 10:11:16 -0700
4Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm
5 architecture
6
7We can not assume that all arches armv7+ are cortex-a8 only
8it fails to build for rpi which is armv7ve based (cortex-a8) cpu
9implementation.
10Fixes
11| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch
12
13Upstream-Status: Pending
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 Makefile.all.am | 6 +++---
18 helgrind/tests/Makefile.am | 6 +++---
19 none/tests/arm/Makefile.am | 18 +++++++++---------
20 3 files changed, 15 insertions(+), 15 deletions(-)
21
22diff --git a/Makefile.all.am b/Makefile.all.am
23index 02059a3..c7c4700 100644
24--- a/Makefile.all.am
25+++ b/Makefile.all.am
26@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g
27
28 AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@
29 AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \
30- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8
31+ $(AM_CFLAGS_BASE) -marm
32 AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \
33- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE)
34+ -marm $(AM_CFLAGS_PSO_BASE)
35 AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \
36- -marm -mcpu=cortex-a8 -g
37+ -marm -g
38
39 AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@
40 AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
41diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am
42index df82169..07eb66a 100644
43--- a/helgrind/tests/Makefile.am
44+++ b/helgrind/tests/Makefile.am
45@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
46 endif
47
48 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
49-annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
50-tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
51-tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8
52+annotate_hbefore_CFLAGS = $(AM_CFLAGS)
53+tc07_hbl1_CFLAGS = $(AM_CFLAGS)
54+tc08_hbl2_CFLAGS = $(AM_CFLAGS)
55 else
56 annotate_hbefore_CFLAGS = $(AM_CFLAGS)
57 tc07_hbl1_CFLAGS = $(AM_CFLAGS)
58diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
59index 024eb6d..ccecb90 100644
60--- a/none/tests/arm/Makefile.am
61+++ b/none/tests/arm/Makefile.am
62@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
63 # need special helping w.r.t -mfpu and -mfloat-abi, though.
64 # Also force -O0 since -O takes hundreds of MB of memory
65 # for v6intThumb.c.
66-v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm
67-v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
68+v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm
69+v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
70
71-v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
72+v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb
73
74 v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm
75 v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb
76@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \
77 v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \
78 -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb
79
80-vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
81+vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \
82 -mfpu=neon \
83 -mthumb
84
85
86-neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
87+neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \
88 -mfpu=neon \
89 -mthumb
90
91-neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
92+neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \
93 -mfpu=neon \
94 -mthumb
95
96 intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
97-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
98-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
99+ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb
100+ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm
101
102-vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
103+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3
104
105 vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
106--
1072.12.2
108
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