elfutils-native: Fix build on distros with gcc 4.8
The patch redhat-portability.diff causes this issue so lets revert the portion which was using %a instead of %m thats recommended anyway, redhat patch seems to be targetting old compilers. (From OE-Core rev: c1cbc57eb80d2cab9a80d5e5aa65419f40eefb15) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
1875fb796f
commit
a6974f2a70
|
@ -0,0 +1,44 @@
|
||||||
|
This patch fixes a warning seen with gcc 4.8 (especially on ubuntu 13.10)
|
||||||
|
|
||||||
|
| addr2line.c: In function 'handle_address':
|
||||||
|
| addr2line.c:450:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
|
||||||
|
| if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
|
||||||
|
| ^
|
||||||
|
| addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
|
||||||
|
| switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
|
||||||
|
| ^
|
||||||
|
| cc1: all warnings being treated as errors
|
||||||
|
|
||||||
|
|
||||||
|
%a is old GNU style and should be abandoned in favor of %m
|
||||||
|
|
||||||
|
Also see
|
||||||
|
|
||||||
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361
|
||||||
|
|
||||||
|
to support this assertion
|
||||||
|
|
||||||
|
This patch is added via redhat-compatibility patch so lets revert this part
|
||||||
|
here.
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [Caused by an earlier patch]
|
||||||
|
|
||||||
|
Index: elfutils-0.155/src/addr2line.c
|
||||||
|
===================================================================
|
||||||
|
--- elfutils-0.155.orig/src/addr2line.c
|
||||||
|
+++ elfutils-0.155/src/addr2line.c
|
||||||
|
@@ -447,10 +447,10 @@ handle_address (const char *string, Dwfl
|
||||||
|
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;
|
|
@ -5,8 +5,6 @@ LICENSE = "(GPLv3 & Elfutils-Exception)"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||||
DEPENDS = "libtool bzip2 zlib virtual/libintl"
|
DEPENDS = "libtool bzip2 zlib virtual/libintl"
|
||||||
|
|
||||||
PR = "r0"
|
|
||||||
|
|
||||||
SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
|
SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "163a5712b86f6bdfebdf233cc6e2192d"
|
SRC_URI[md5sum] = "163a5712b86f6bdfebdf233cc6e2192d"
|
||||||
|
@ -24,6 +22,7 @@ SRC_URI += "\
|
||||||
file://dso-link-change.patch \
|
file://dso-link-change.patch \
|
||||||
file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
|
file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
|
||||||
file://elfutils-ar-c-fix-num-passed-to-memset.patch \
|
file://elfutils-ar-c-fix-num-passed-to-memset.patch \
|
||||||
|
file://fix-build-gcc-4.8.patch \
|
||||||
"
|
"
|
||||||
# Only apply when building uclibc based target recipe
|
# Only apply when building uclibc based target recipe
|
||||||
SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
|
SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
|
||||||
|
|
Loading…
Reference in New Issue