Skip to contentSkip to conversation

valgrind fixes

PATCH In review Andre McCurdy 3 participants 7 messages Dec 22, 2015 – Jan 8, 2016

lore
Share & tools
lore
#0 lore raw

cover valgrind fixes

Andre McCurdy (3):
security_flags.inc: disable -fstack-protector-XXX for valgrind
valgrind: don't restrict to armv7a
valgrind: include aarch64 in COMPATIBLE_HOST

 meta/conf/distro/include/security_flags.inc       | 2 +-
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 security_flags.inc: disable -fstack-protector-XXX for valgrind

Valgrind (v3.11.0) expects to build with stack protection disabled and includes -fno-stack-protector in its default CFLAGS. However, the CFLAGS provided by OE are included on the compiler command line after the defaults so any -fstack-protector-all / -fstack-protector-strong option provided by security_flags.inc will cause problems.

| .../build-bcm97425vms/tmp/work/mips32el-rdk-linux/valgrind/3.11.0-r0/valgrind-3.11.0/coregrind/m_mallocfree.c:892: undefined reference to __stack_chk_guard' | .../build-bcm97425vms/tmp/work/mips32el-rdk-linux/valgrind/3.11.0-r0/valgrind-3.11.0/coregrind/m_mallocfree.c:947: undefined reference to __stack_chk_fail'

---
 meta/conf/distro/include/security_flags.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/security_flags.inc +1 -1
index 14ac0bf..1795750 100644
@@ -84,7 +84,7 @@ SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-tcl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-tiff = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-valgrind = ""
 SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
 
 # These 2 have text relco errors with the pie options enabled
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/3 valgrind: don't restrict to armv7a

In reply to Andre McCurdy

Valgrind has been tested on armv5te/qemuarm, so it seems that valgrind's configure check for armv7 is over cautious.

---
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +5 -3
index 3dc3cc1..bb3f6e1 100644
@@ -26,14 +26,16 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
 SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
 
-COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux'
-COMPATIBLE_HOST_armv7a = 'arm.*-linux'
+COMPATIBLE_HOST = '(i.86|x86_64|arm|mips|powerpc|powerpc64).*-linux'
 
 inherit autotools ptest
 
 EXTRA_OECONF = "--enable-tls --without-mpicc"
-EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
 EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}"
+
+# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
+EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
+
 EXTRA_OEMAKE = "-w"
 
 do_install_append () {
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 2/3] valgrind: don't restrict to armv7a

Quoted 2 lines · Andre McCurdy

Valgrind has been tested on armv5te/qemuarm, so it seems that valgrind's configure check for armv7 is over cautious.

Ping. This is more urgent now that arch-armv7ve.inc has been merged to oe-core master.

Quoted 32 lines
---
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +5 -4
index 3dc3cc1..bb3f6e1 100644
@@ -26,14 +26,16 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
 SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
 
-COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux'
-COMPATIBLE_HOST_armv7a = 'arm.*-linux'
+COMPATIBLE_HOST = '(i.86|x86_64|arm|mips|powerpc|powerpc64).*-linux'
 
 inherit autotools ptest
 
 EXTRA_OECONF = "--enable-tls --without-mpicc"
-EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
 EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}"
+
+# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
+EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
+
 EXTRA_OEMAKE = "-w"
 
 do_install_append () {
--

1.9.1

#4 lore raw

Re: [PATCH 2/3] valgrind: don't restrict to armv7a

Quoted 3 lines · Andre McCurdy

Ping. This is more urgent now that arch-armv7ve.inc has been merged to oe-core master.

Sadly 3.11 totally breaks on PPC, so that's blocking. Maybe rebase the patch to master before the 3.11 upgrade?

Ross

#5 lore raw

Re: [PATCH 2/3] valgrind: don't restrict to armv7a

Quoted 10 lines · Ross

On 7 January 2016 at 21:03, Andre McCurdy <[email protected] <mailto:[email protected]>> wrote:

Ping. This is more urgent now that arch-armv7ve.inc has been merged to oe-core master.

Sadly 3.11 totally breaks on PPC, so that's blocking. Maybe rebase the patch to master before the 3.11 upgrade?

I'll fix the PPC breakage and resend (with Andre's fix commits if they aren't yet in master against old version by then).

Alex

#6 lore raw

PATCH 3/3 valgrind: include aarch64 in COMPATIBLE_HOST

In reply to Andre McCurdy

Valgrind has supported aarch64 since v3.10.0.

---
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +1 -1
index bb3f6e1..293dd2b 100644
@@ -26,7 +26,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
 SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
 
-COMPATIBLE_HOST = '(i.86|x86_64|arm|mips|powerpc|powerpc64).*-linux'
+COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
 
 inherit autotools ptest
 
Signature · 1 line
1.9.1