diff options
| author | Andre McCurdy <armccurdy@gmail.com> | 2016-01-19 18:47:50 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-24 09:40:21 +0000 |
| commit | b191f585571cd5a32b80f240e44d44d1ac25f482 (patch) | |
| tree | 34eaeb176c7530abc0ceeaf503afa353fe865e24 | |
| parent | b0b34127cb6d47eed4b4f5f31392f3a3bf23a6ae (diff) | |
| download | poky-b191f585571cd5a32b80f240e44d44d1ac25f482.tar.gz | |
valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
The intdiv test has been partially fixed upstream and the
vcvt_fixed_float_VFP test can be fixed with a similar approach, ie
ensuring that it is always compiled with appropriate
-march/-mcpu/-mfpu flags to support the instructions being tested.
For tests requiring armv7ve instructions, ensure that we set both
-march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set
-march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to
over-ride that).
See similar cases in none/tests/arm/Makefile.am
(From OE-Core rev: 3e94af90d90f6db6bab66ae87a47b31f3a0474f6)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 45 insertions, 67 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch deleted file mode 100644 index 2319ab98c5..0000000000 --- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | Remove arm tests that don't compile | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Corrects the original commit for the patch that removed ARM ptest CFLAGS | ||
| 6 | settings. Since the flags could be set by a user, the flags should | ||
| 7 | be kept in place during compilation. By keeping the original up-stream | ||
| 8 | CFLAGS for the tests, then additional tests successfully compile | ||
| 9 | for all tested ARM tunings. | ||
| 10 | |||
| 11 | However, there were still two tests listed below that did not compile | ||
| 12 | for any beaglebone tuning that is valid for valgrind. With the updated | ||
| 13 | patch, the set of excluded ARM ptests and their respective build | ||
| 14 | failures are: | ||
| 15 | intdiv - fails for all beaglebone tunings with 2 errors: | ||
| 16 | {standard input}:(40 or 41): Error: selected processor does not | ||
| 17 | support Thumb mode `udiv r3,r9,r10' | ||
| 18 | {standard input}:(72 or 73): Error: selected processor does not | ||
| 19 | support Thumb mode `sdiv r3,r9,r10' | ||
| 20 | |||
| 21 | vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of | ||
| 22 | two ways: | ||
| 23 | with neon tuning (-mfpu=neon) fails with Internal Compiler Error | ||
| 24 | without neon tuning fails with 3 errors: | ||
| 25 | {standard input}:33: Error: selected FPU does not support | ||
| 26 | instruction -- `vcvt.f32.s32 s15,s15,#1' | ||
| 27 | {standard input}:58: Error: selected FPU does not support | ||
| 28 | instruction -- `vcvt.f32.s32 s15,s15,#32' | ||
| 29 | {standard input}:136: Error: selected FPU does not support | ||
| 30 | instruction -- `vcvt.f32.u32 s15,s15,#1' | ||
| 31 | |||
| 32 | After applying this commit, the valgrind ARM ptests compile without | ||
| 33 | errors for tunings: | ||
| 34 | armv7[t][hf][b][-neon] cortexa8[t][hf][-neon] | ||
| 35 | where the tuning [option] was successfully compiled, both with | ||
| 36 | and without the 'option', and in combination with all other options. | ||
| 37 | |||
| 38 | Signed-off-by: Dave Lerner <dave.lerner@windriver.com> | ||
| 39 | |||
| 40 | Index: valgrind-3.10.1/none/tests/arm/Makefile.am | ||
| 41 | =================================================================== | ||
| 42 | --- valgrind-3.10.1.orig/none/tests/arm/Makefile.am 2015-05-19 15:11:59.224842927 -0500 | ||
| 43 | +++ valgrind-3.10.1/none/tests/arm/Makefile.am 2015-05-19 15:14:20.808847028 -0500 | ||
| 44 | @@ -17,9 +17,13 @@ | ||
| 45 | vfp.stdout.exp vfp.stderr.exp vfp.vgtest \ | ||
| 46 | vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest | ||
| 47 | |||
| 48 | +# Remove the following tests which cause compiler errors for all tunings | ||
| 49 | +# available for beagle bone (see remove-arm-variant-specific.patch): | ||
| 50 | +# intdiv | ||
| 51 | +# vcvt_fixed_float_VFP | ||
| 52 | + | ||
| 53 | check_PROGRAMS = \ | ||
| 54 | allexec \ | ||
| 55 | - intdiv \ | ||
| 56 | ldrt \ | ||
| 57 | ldrt_arm \ | ||
| 58 | neon128 \ | ||
| 59 | @@ -27,7 +31,6 @@ | ||
| 60 | v6intARM \ | ||
| 61 | v6intThumb \ | ||
| 62 | v6media \ | ||
| 63 | - vcvt_fixed_float_VFP \ | ||
| 64 | vfp \ | ||
| 65 | vfpv4_fma | ||
| 66 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch new file mode 100644 index 0000000000..adea405213 --- /dev/null +++ b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From d134dafc2f11e0d247420a0ba360bcdef77b4093 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
| 3 | Date: Tue, 19 Jan 2016 16:00:00 -0800 | ||
| 4 | Subject: [PATCH] use appropriate -march/-mcpu/-mfpu for ARM test apps | ||
| 5 | |||
| 6 | Ensure that test apps in none/tests/arm are compiled with appropriate | ||
| 7 | -march/-mcpu/-mfpu flags to support the instructions being tested. | ||
| 8 | The aim is to build all tests, even ones which may not run correctly | ||
| 9 | on all target CPUs. | ||
| 10 | |||
| 11 | For tests requiring armv7ve instructions, ensure that we set both | ||
| 12 | -march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set | ||
| 13 | -march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to | ||
| 14 | over-ride that). | ||
| 15 | |||
| 16 | See similar cases in none/tests/arm/Makefile.am | ||
| 17 | |||
| 18 | Upstream-Status: Pending | ||
| 19 | |||
| 20 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 21 | --- | ||
| 22 | none/tests/arm/Makefile.am | 6 ++++-- | ||
| 23 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am | ||
| 26 | index 4507a20..825290f 100644 | ||
| 27 | --- a/none/tests/arm/Makefile.am | ||
| 28 | +++ b/none/tests/arm/Makefile.am | ||
| 29 | @@ -62,8 +62,10 @@ neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ | ||
| 30 | -mfpu=neon \ | ||
| 31 | -mthumb | ||
| 32 | |||
| 33 | -intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb | ||
| 34 | +intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb | ||
| 35 | ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb | ||
| 36 | ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm | ||
| 37 | |||
| 38 | -vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm | ||
| 39 | +vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 | ||
| 40 | + | ||
| 41 | +vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm | ||
| 42 | -- | ||
| 43 | 1.9.1 | ||
| 44 | |||
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb index 8e9b72cd61..4f7c39a7bc 100644 --- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | |||
| @@ -15,13 +15,13 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d | |||
| 15 | SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ | 15 | SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \ |
| 16 | file://fixed-perl-path.patch \ | 16 | file://fixed-perl-path.patch \ |
| 17 | file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ | 17 | file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ |
| 18 | file://remove-arm-variant-specific.patch \ | ||
| 19 | file://run-ptest \ | 18 | file://run-ptest \ |
| 20 | file://11_mips-link-tool.patch \ | 19 | file://11_mips-link-tool.patch \ |
| 21 | file://0002-remove-rpath.patch \ | 20 | file://0002-remove-rpath.patch \ |
| 22 | file://0004-Fix-out-of-tree-builds.patch \ | 21 | file://0004-Fix-out-of-tree-builds.patch \ |
| 23 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ | 22 | file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ |
| 24 | file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ | 23 | file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ |
| 24 | file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ | ||
| 25 | " | 25 | " |
| 26 | 26 | ||
| 27 | SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129" | 27 | SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129" |
