summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-09-13 05:25:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-14 08:29:42 +0100
commita6974f2a70d1900b29a441bf350106769714ca2c (patch)
tree9b43a9dd2b1b8213c293ea5cf6dd3dc83407f728 /meta/recipes-devtools/elfutils
parent1875fb796f3680489a6eee082ca445df4b4113d3 (diff)
downloadpoky-a6974f2a70d1900b29a441bf350106769714ca2c.tar.gz
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>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch44
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.155.bb3
2 files changed, 45 insertions, 2 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch
new file mode 100644
index 0000000000..a7c351941f
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch
@@ -0,0 +1,44 @@
1This patch fixes a warning seen with gcc 4.8 (especially on ubuntu 13.10)
2
3| addr2line.c: In function 'handle_address':
4| addr2line.c:450:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
5| if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
6| ^
7| addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]
8| switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
9| ^
10| cc1: all warnings being treated as errors
11
12
13%a is old GNU style and should be abandoned in favor of %m
14
15Also see
16
17http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54361
18
19to support this assertion
20
21This patch is added via redhat-compatibility patch so lets revert this part
22here.
23
24Signed-off-by: Khem Raj <raj.khem@gmail.com>
25
26Upstream-Status: Inappropriate [Caused by an earlier patch]
27
28Index: elfutils-0.155/src/addr2line.c
29===================================================================
30--- elfutils-0.155.orig/src/addr2line.c
31+++ elfutils-0.155/src/addr2line.c
32@@ -447,10 +447,10 @@ handle_address (const char *string, Dwfl
33 bool parsed = false;
34 int i, j;
35 char *name = NULL;
36- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
37+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
38 && string[i] == '\0')
39 parsed = adjust_to_section (name, &addr, dwfl);
40- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
41+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
42 {
43 default:
44 break;
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.155.bb b/meta/recipes-devtools/elfutils/elfutils_0.155.bb
index c5a2f0ebab..1a8c3c7e8c 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.155.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.155.bb
@@ -5,8 +5,6 @@ LICENSE = "(GPLv3 & Elfutils-Exception)"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6DEPENDS = "libtool bzip2 zlib virtual/libintl" 6DEPENDS = "libtool bzip2 zlib virtual/libintl"
7 7
8PR = "r0"
9
10SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2" 8SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
11 9
12SRC_URI[md5sum] = "163a5712b86f6bdfebdf233cc6e2192d" 10SRC_URI[md5sum] = "163a5712b86f6bdfebdf233cc6e2192d"
@@ -24,6 +22,7 @@ SRC_URI += "\
24 file://dso-link-change.patch \ 22 file://dso-link-change.patch \
25 file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \ 23 file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
26 file://elfutils-ar-c-fix-num-passed-to-memset.patch \ 24 file://elfutils-ar-c-fix-num-passed-to-memset.patch \
25 file://fix-build-gcc-4.8.patch \
27" 26"
28# Only apply when building uclibc based target recipe 27# Only apply when building uclibc based target recipe
29SRC_URI_append_libc-uclibc = " file://uclibc-support.patch" 28SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"