Skip to contentSkip to conversation

valgrind: update to 3.11.0 + fixes

PATCH In review Andre McCurdy 2 participants 12 messages Dec 18, 2015

lore
Share & tools
lore
#0 lore raw

v3 cover valgrind: update to 3.11.0 + fixes

Rebase Alexander's valgrind 3.11.0 update patch to current oe-core master (remove redunant FILES_${PN}-dbg line) plus fix additional issues.

This time based on v2 of Alexander's 3.11.0 update patch...

Alexander Kanavin (1):
valgrind: update to 3.11.0

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 +-
 ...able-rt_sigpending-syscall-on-ppc64-linux.patch |  35 ---
 .../valgrind/valgrind/0002-remove-rpath.patch      |  35 +++
 .../valgrind/0004-Fix-out-of-tree-builds.patch     | 175 +++++++++++++++
 ...vg_test-wrapper-to-support-PTEST-formats.patch} |  87 ++++----
 .../valgrind/enable.building.on.4.x.kernel.patch   |  37 ----
 .../valgrind/valgrind/force-nostabs.patch          |  42 ----
 .../recipes-devtools/valgrind/valgrind/glibc.patch |  44 ----
 .../pass-maltivec-only-if-it-supported.patch       |  68 ------
 .../valgrind/remove-ppc-tests-failing-build.patch  |  75 -------
 .../valgrind/valgrind/sepbuildfix.patch            | 235 ---------------------
 .../{valgrind_3.10.1.bb => valgrind_3.11.0.bb}     |  42 ++--
 12 files changed, 278 insertions(+), 599 deletions(-)
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
 rename meta/recipes-devtools/valgrind/valgrind/{add-ptest.patch => 0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch} (80%)
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/glibc.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch
 rename meta/recipes-devtools/valgrind/{valgrind_3.10.1.bb => valgrind_3.11.0.bb} (72%)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 1/4 valgrind: update to 3.11.0

From: Alexander Kanavin <[email protected]>

LICENSE checksums are changed due to a change in FSF address, or copyright years update.

Rebased patches:
sepbuildfix.patch rebased to 0004-Fix-out-of-tree-builds.patch add-ptest.patch rebased to 0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch

Removed patches:
force-nostabs.patch removed because it's patching lines that have been removed upstream remove-ppc-tests-failing-build.patch removed because it no longer applies, and rebasing it requires building with special ppc32 machine configurations; qemuppc build is fine without it. enable.building.on.4.x.kernel.patch removed because the problem is fixed upstream glibc.patch removed for the same reason

Removed backports:
pass-maltivec-only-if-it-supported.patch 0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch

---
 ...able-rt_sigpending-syscall-on-ppc64-linux.patch |  35 ---
 .../valgrind/valgrind/0002-remove-rpath.patch      |  35 +++
 .../valgrind/0004-Fix-out-of-tree-builds.patch     | 175 +++++++++++++++
 ...vg_test-wrapper-to-support-PTEST-formats.patch} |  87 ++++----
 .../valgrind/enable.building.on.4.x.kernel.patch   |  37 ----
 .../valgrind/valgrind/force-nostabs.patch          |  42 ----
 .../recipes-devtools/valgrind/valgrind/glibc.patch |  44 ----
 .../pass-maltivec-only-if-it-supported.patch       |  68 ------
 .../valgrind/remove-ppc-tests-failing-build.patch  |  75 -------
 .../valgrind/valgrind/sepbuildfix.patch            | 235 ---------------------
 .../{valgrind_3.10.1.bb => valgrind_3.11.0.bb}     |  34 ++-
 11 files changed, 272 insertions(+), 595 deletions(-)
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
 rename meta/recipes-devtools/valgrind/valgrind/{add-ptest.patch => 0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch} (80%)
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/glibc.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch
 rename meta/recipes-devtools/valgrind/{valgrind_3.10.1.bb => valgrind_3.11.0.bb} (77%)
meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch deleted +0 -35
deleted file mode 100644
index 56bb5f5..0000000
@@ -1,35 +0,0 @@
-From 1a8006f56342dae9f7100a3c33d80873676e0404 Mon Sep 17 00:00:00 2001
-From: Li Zhou <[email protected]>
-Date: Mon, 24 Aug 2015 03:55:18 -0400
-Subject: [PATCH] valgrind: Enable rt_sigpending syscall on ppc64 linux
-
-New Revision: 15133
-Enable rt_sigpending syscall on ppc64 linux.
-Patch from Thomas Huth <[email protected]>
-
-Get the patch from valgrind upstream:
-http://valgrind.10908.n7.nabble.com/Valgrind-r15133-in-trunk-NEWS-coregrind-m-syswrap-syswrap-ppc64-linux-c-td54589.html
-
-Upstream-Status: backport
-
-Signed-off-by: Li Zhou <[email protected]>
----
- coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
-index 5946ee1..8aaa1d7 100644
---- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
-+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
-@@ -887,7 +887,7 @@ static SyscallTableEntry syscall_table[] = {
-    LINXY(__NR_rt_sigaction,      sys_rt_sigaction),       // 173
-    LINXY(__NR_rt_sigprocmask,    sys_rt_sigprocmask),     // 174
- 
--// _____(__NR_rt_sigpending,     sys_rt_sigpending),      // 175
-+   LINXY(__NR_rt_sigpending,     sys_rt_sigpending),      // 175
-    LINXY(__NR_rt_sigtimedwait,   sys_rt_sigtimedwait),    // 176
-    LINXY(__NR_rt_sigqueueinfo,   sys_rt_sigqueueinfo),    // 177
-    LINX_(__NR_rt_sigsuspend,     sys_rt_sigsuspend),      // 178
--- 
-1.9.1
-
meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch new file +35 -0
new file mode 100644
index 0000000..e9112da
@@ -0,0 +1,35 @@
+From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Tue, 15 Dec 2015 15:01:34 +0200
+Subject: [PATCH 2/5] remove rpath
+
+Upstream-Status: Inappropriate [embedded config]
+Signed-off-by: Saul Wold <[email protected]>
+---
+ none/tests/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
+index 54f2a7e..25b0f49 100644
+--- a/none/tests/Makefile.am
++++ b/none/tests/Makefile.am
+@@ -326,7 +326,6 @@ threadederrno_CFLAGS	+= --std=c99
+ endif
+ tls_SOURCES		= tls.c tls2.c
+ tls_DEPENDENCIES	= tls.so tls2.so
+-tls_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests
+ tls_LDADD		= tls.so tls2.so -lpthread
+ tls_so_SOURCES		= tls_so.c
+ tls_so_DEPENDENCIES	= tls2.so
+@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
+  tls_so_LDFLAGS		= -dynamic -dynamiclib -all_load -fpic
+  tls_so_LDADD		= `pwd`/tls2.so
+ else
+- tls_so_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
++ tls_so_LDFLAGS		= -shared -fPIC
+  tls_so_LDADD		= tls2.so
+ endif
+ tls_so_CFLAGS		= $(AM_CFLAGS) -fPIC
+-- 
+2.6.2
+
meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch new file +175 -0

175 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch renamed from meta/recipes-devtools/valgrind/valgrind/add-ptest.patch +48 -39

212 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch deleted +0 -37
deleted file mode 100644
index 300f2f1..0000000
@@ -1,37 +0,0 @@
-Enable building valgrind on host with 4.x kernel.
-
-For OpenEmbedded builds we should be checking something like
-OLDEST_KERNEL instead of `uname -r`, but this is good enough for now.
-
-Building on 4.x* currently fails with:
-  configure:5556: checking for the kernel version
-  configure:5579: result: unsupported (4.0.0-rc3-00111-gaffb817)
-  configure:5581: error: Valgrind works on kernels 2.4, 2.6
-
-Upstream-Status: Pending
-Signed-off-by: Martin Jansa <[email protected]>
-
---- valgrind-3.9.0/configure.ac.orig	2015-03-13 19:17:01.247310868 +0100
-+++ valgrind-3.9.0/configure.ac	2015-03-13 19:19:27.388316108 +0100
-@@ -276,9 +276,9 @@
-         kernel=`uname -r`
- 
-         case "${kernel}" in
--             2.6.*|3.*) 
--        	    AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
--        	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
-+             2.6.*|3.*|4.*) 
-+        	    AC_MSG_RESULT([2.6.x/3.x/4.x family (${kernel})])
-+        	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x or Linux 4.x])
-         	    ;;
- 
-              2.4.*) 
-@@ -288,7 +288,7 @@
- 
-              *) 
-         	    AC_MSG_RESULT([unsupported (${kernel})])
--        	    AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
-+        	    AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6, 3.x, 4.x])
-         	    ;;
-         esac
- 
meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/glibc.patch deleted +0 -44

44 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch deleted +0 -68

68 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch deleted +0 -75

75 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch deleted +0 -235

235 lines not on this page · raw message

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb renamed from meta/recipes-devtools/valgrind/valgrind_3.10.1.bb +14 -20
similarity index 77%
rename from meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
rename to meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index c38a07b..3dc3cc1 100644
@@ -2,10 +2,10 @@ SUMMARY = "Valgrind memory debugger and instrumentation framework"
 HOMEPAGE = "http://valgrind.org/"
 BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
 LICENSE = "GPLv2 & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
-                    file://include/pub_tool_basics.h;beginline=1;endline=29;md5=e7071929a50d4b0fc27a3014b315b0f7 \
-                    file://include/valgrind.h;beginline=1;endline=56;md5=92df8a1bde56fe2af70931ff55f6622f \
-                    file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \
+                    file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \
+                    file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
 
 X11DEPENDS = "virtual/libx11"
 DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
@@ -15,28 +15,20 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d
 SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://fixed-perl-path.patch \
            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
-           file://sepbuildfix.patch \
-           file://glibc.patch \
-           file://force-nostabs.patch \
            file://remove-arm-variant-specific.patch \
-           file://remove-ppc-tests-failing-build.patch \
-           file://valgrind-remove-rpath.patch \
-           file://enable.building.on.4.x.kernel.patch \
-           file://add-ptest.patch \
-           file://pass-maltivec-only-if-it-supported.patch \
            file://run-ptest \
-           file://0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch \
            file://11_mips-link-tool.patch \
-          "
+           file://0002-remove-rpath.patch \
+           file://0004-Fix-out-of-tree-builds.patch \
+           file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
+           "
 
-SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"
-SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997"
+SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
+SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
 
 COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux'
 COMPATIBLE_HOST_armv7a = 'arm.*-linux'
 
-PR = "r1"
-
 inherit autotools ptest
 
 EXTRA_OECONF = "--enable-tls --without-mpicc"
@@ -56,11 +48,14 @@ RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
 
 RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
 
+# One of the tests contains a bogus interpreter path on purpose, and QA
+# check complains about it
+INSANE_SKIP_${PN}-ptest += "file-rdeps"
+
 do_compile_ptest() {
     oe_runmake check CFLAGS="${CFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0"
 }
 
-
 do_install_ptest() {
     chmod +x ${B}/tests/vg_regtest
 
@@ -101,4 +96,3 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
 }
-
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/4 security_flags.inc: disable -fstack-protector-XXX for valgrind

In reply to Andre McCurdy

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
#3 lore raw

Re: [PATCH 2/4 v3] security_flags.inc: disable -fstack-protector-XXX for valgrind

Quoted 25 lines · Andre McCurdy

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 +0 -0
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}"

meta/conf/distro/include/security_flags.inc

Quoted 2 lines
meta/conf/distro/include/security_flags.inc +1 -1
-SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-valgrind = “"

Can we instead add -lssp to LDFLAGS ?

Quoted 11 lines

SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"

# These 2 have text relco errors with the pie options enabled --
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

Re: [PATCH 2/4 v3] security_flags.inc: disable -fstack-protector-XXX for valgrind

Quoted 17 lines · Khem Raj
Quoted 17 lines · Andre McCurdy

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(-)
Quoted 12 lines

meta/conf/distro/include/security_flags.inc

Quoted 10 lines
meta/conf/distro/include/security_flags.inc +0 -0
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}"

meta/conf/distro/include/security_flags.inc +1 -1
-SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-valgrind = “"

Can we instead add -lssp to LDFLAGS ?

Probably. Valgrind deliberately adds -fno-stack-protector to it's own CFLAGS though, so by forcing it to use the stack protector you would be going against the wishes of the Valgrind developers.

Quoted 12 lines
Quoted 11 lines

SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"

# These 2 have text relco errors with the pie options enabled --
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

Re: [PATCH 2/4 v3] security_flags.inc: disable -fstack-protector-XXX for valgrind

Quoted 34 lines · Andre McCurdy
Quoted 17 lines · Khem Raj
Quoted 17 lines · Andre McCurdy

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(-)
Quoted 12 lines

meta/conf/distro/include/security_flags.inc

Quoted 10 lines
meta/conf/distro/include/security_flags.inc +0 -0
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}"

meta/conf/distro/include/security_flags.inc +1 -1
-SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-valgrind = “"

Can we instead add -lssp to LDFLAGS ?

Quoted 3 lines

Probably. Valgrind deliberately adds -fno-stack-protector to it's own CFLAGS though, so by forcing it to use the stack protector you would be going against the wishes of the Valgrind developers.

I think you are right in this case.

#6 lore raw

PATCH v3 3/4 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
#7 lore raw

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

Quoted 28 lines · 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 +0 -0
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"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +1 -2
-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']}"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \

Quoted 3 lines
meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +3 -0
+
+# 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}”

this could be problematic for arm < v7

Quoted 13 lines

+

EXTRA_OEMAKE = "-w"

do_install_append () {
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw

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

Quoted 25 lines · Khem Raj
Quoted 25 lines · 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 +0 -0
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"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +1 -2
-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

Quoted 8 lines

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \

Quoted 6 lines

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']}"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +3 -0
+
+# 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}”

this could be problematic for arm < v7

The configure script will give an error if ${host_cpu} doesn't begin with "armv7", so we either have to provide this kind of fake --host option or patch the configure script.

Do you think patching the configure script would be better ?

Quoted 13 lines
Quoted 12 lines

EXTRA_OEMAKE = "-w"

do_install_append () {
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#9 lore raw

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

Quoted 38 lines · Andre McCurdy
Quoted 25 lines · Khem Raj
Quoted 25 lines · 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 +0 -0
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"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +1 -2
-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

Quoted 8 lines

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \

Quoted 6 lines

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']}"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +3 -0
+
+# 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}”

this could be problematic for arm < v7

Quoted 3 lines

The configure script will give an error if ${host_cpu} doesn't begin with "armv7", so we either have to provide this kind of fake --host option or patch the configure script.

How is it working right now ?

Quoted 2 lines

Do you think patching the configure script would be better ?

that could be better since we will get failure.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines

EXTRA_OEMAKE = "-w"

do_install_append () {
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#10 lore raw

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

Quoted 38 lines · Khem Raj
Quoted 38 lines · Andre McCurdy
Quoted 33 lines · Khem Raj
Quoted 28 lines · 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 +0 -0
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"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +1 -2
-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']}"

meta/recipes-devtools/valgrind/valgrind_3.11.0.bb SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \

Quoted 3 lines
meta/recipes-devtools/valgrind/valgrind_3.11.0.bb +3 -0
+
+# 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}”

this could be problematic for arm < v7

Quoted 5 lines
Quoted 3 lines

The configure script will give an error if ${host_cpu} doesn't begin with "armv7", so we either have to provide this kind of fake --host option or patch the configure script.

How is it working right now ?

Up to now the recipe has been forcing "--host=armv7-..." via EXTRA_OECONF. That hasn't changed.

The thing that's changed is that previously you couldn't build for any ARM target other than armv7a, now you can.

Quoted 20 lines
Quoted 2 lines

Do you think patching the configure script would be better ?

that could be better since we will get failure.

Quoted 14 lines
Quoted 14 lines
Quoted 13 lines

EXTRA_OEMAKE = "-w"

do_install_append () {
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#11 lore raw

PATCH v3 4/4 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