aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-05-28 16:49:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-03 16:45:05 +0100
commitd9c7a02240ce37d5b2569d9177e8ba534b9295ce (patch)
tree4bc28791245ebcdc7d64ba2aa6a287c73838ddcb /meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
parentd9d7b0515fcf47c4cf7533a12915ea92298ce834 (diff)
downloadopenembedded-core-contrib-d9c7a02240ce37d5b2569d9177e8ba534b9295ce.tar.gz
elfutils: upgrade to 0.158
Add 'm4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch' to fix cross compiling failure; Rebase 'elf_additions.diff' for 0.158; Drop obsolete patches: - nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch - elfutils-ar-c-fix-num-passed-to-memset.patch - fix-build-gcc-4.8.patch Pick patches from debian: http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.158-2.debian.tar.xz We could not directly add elfutils_0.158-2.debian.tar.xz to SRC_URI, because it contains other souce codes which are not pathces. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
new file mode 100644
index 0000000000..c08519cf53
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
@@ -0,0 +1,40 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+Subject: Use %m[ instead of %a[ in scanf()
+
+%a was a gnu extention, but C99 made this a float. So it got
+changed to %m (supported by glibc 2.7), but %a[ and %as are
+still supported by glibc. The portability branch changed this
+from %m to %a again since that's supported by more versions of
+glibc. However gcc gives a warning about this using -Wformat
+and we have a new enough libc to use %m.
+
+Index: elfutils-0.153/src/addr2line.c
+===================================================================
+--- elfutils-0.153.orig/src/addr2line.c 2012-02-24 22:29:50.000000000 +0000
++++ elfutils-0.153/src/addr2line.c 2012-02-24 22:29:52.000000000 +0000
+@@ -455,10 +455,10 @@
+ bool parsed = false;
+ int i, j;
+ char *name = NULL;
+- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
++ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ && string[i] == '\0')
+ parsed = adjust_to_section (name, &addr, dwfl);
+- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
++ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ {
+ default:
+ break;
+Index: elfutils-0.153/tests/line2addr.c
+===================================================================
+--- elfutils-0.153.orig/tests/line2addr.c 2012-02-24 22:29:50.000000000 +0000
++++ elfutils-0.153/tests/line2addr.c 2012-02-24 22:29:52.000000000 +0000
+@@ -132,7 +132,7 @@
+ {
+ struct args a = { .arg = argv[cnt] };
+
+- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
++ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
+ {
+ default:
+ case 0: