aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/ltrace
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2015-04-10 12:14:43 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2015-04-13 12:55:52 +0200
commit932146a33175f14fda42899edf78fb31228062e5 (patch)
treef6d6e32e4b3c4ecd1394cdc38b706293bed0c812 /meta-oe/recipes-devtools/ltrace
parent10437b88424e8ed4b552029a92017452ea1b1e73 (diff)
downloadmeta-openembedded-contrib-932146a33175f14fda42899edf78fb31228062e5.tar.gz
ltrace: fix build with -Os
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/ltrace')
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-In-Linux-backend-initialize-linkmap-struct.patch31
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_git.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-In-Linux-backend-initialize-linkmap-struct.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-In-Linux-backend-initialize-linkmap-struct.patch
new file mode 100644
index 00000000000..13609c13c1e
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-In-Linux-backend-initialize-linkmap-struct.patch
@@ -0,0 +1,31 @@
+From efd12cfb10ccd2c612838c0e22069554ce60637c Mon Sep 17 00:00:00 2001
+From: Petr Machata <pmachata@redhat.com>
+Date: Wed, 2 Jan 2013 16:01:43 +0100
+Subject: [PATCH] In Linux backend, initialize linkmap struct
+
+GCC 4.7.2 -m32 -Os gives the following (spurious) warning:
+proc.c: In function 'crawl_linkmap':
+proc.c:544:25: error: 'rlm.l_addr' may be used uninitialized in this
+
+Upstream-Status: Backport
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ sysdeps/linux-gnu/proc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
+index 6e01d28..d69c985 100644
+--- a/sysdeps/linux-gnu/proc.c
++++ b/sysdeps/linux-gnu/proc.c
+@@ -484,7 +484,7 @@ crawl_linkmap(struct process *proc, struct lt_r_debug_64 *dbg)
+ arch_addr_t addr = (arch_addr_t)(uintptr_t)dbg->r_map;
+
+ while (addr != 0) {
+- struct lt_link_map_64 rlm;
++ struct lt_link_map_64 rlm = {};
+ if (lm_fetcher(proc)(proc, addr, &rlm) < 0) {
+ debug(2, "Unable to read link map");
+ return;
+--
+2.3.5
+
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 69848483d75..f9f16843bda 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "elfutils"
SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git \
file://ltrace-0.7.2-unused-typedef.patch \
file://configure-allow-to-disable-selinux-support.patch \
+ file://0001-In-Linux-backend-initialize-linkmap-struct.patch \
"
S = "${WORKDIR}/git"