1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

valgrind: let valgrind determine its own optimisation flags

Valgrind likes to control its own optimisation flags. It generally
defaults to -O2 but uses -O0 for some specific test apps etc. Passing
our own flags (via CFLAGS) means we interfere with that.

Giving valgrind control of optimisation is hopefully an even better
solution than the previous one of forcing -O0 for all tests.

  http://git.openembedded.org/openembedded-core/commit/?h=master-next&id=98c4a3ffb8dca10739be600e8d6df7fb6aa4958f

(From OE-Core rev: 1c8ed8dada8d3399bd825d6f34fc440ce793ec4e)

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>
This commit is contained in:
Andre McCurdy
2016-01-19 18:47:49 -08:00
committed by Richard Purdie
parent 92abb5f1ce
commit b0b34127cb
@@ -44,6 +44,11 @@ EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
EXTRA_OEMAKE = "-w"
# valgrind likes to control its own optimisation flags. It generally defaults
# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
# (via CFLAGS) means we interfere with that.
SELECTED_OPTIMIZATION = ""
CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
do_install_append () {
@@ -63,10 +68,9 @@ RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
INSANE_SKIP_${PN}-ptest += "file-rdeps"
do_compile_ptest() {
oe_runmake check CFLAGS="${CFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0"
oe_runmake check
}
do_install_ptest() {
chmod +x ${B}/tests/vg_regtest
@@ -107,4 +111,3 @@ do_install_ptest() {
# handle multilib
sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
}