diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2017-04-06 14:23:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-08 22:48:06 +0100 |
commit | aaf4c4f3d09ac3897205417eb15e19d54e0c0d05 (patch) | |
tree | b1fcacbe6c4b3f14af545ff148e5b1ad43c3c37c /meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch | |
parent | 246df3df4b7da4b75de0745938438124c2b1d4a5 (diff) | |
download | openembedded-core-contrib-aaf4c4f3d09ac3897205417eb15e19d54e0c0d05.tar.gz |
elfutils: fix building elfutils-native with GCC7
Backport a fix from upstream for a -Wformat-truncation=2 warning
and implement a simple fix for a -Wimplicit-fallthrough warning.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch new file mode 100644 index 0000000000..b2623f9d2e --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch @@ -0,0 +1,36 @@ +GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through, +however this causes warnings (which are promoted to errors) with the elfutils +patches from Debian for mips and parisc, which use fallthrough's by design. + +Explicitly mark the intentional fallthrough switch cases with a comment to +disable the warnings where the fallthrough behaviour is desired. + +Upstream-Status: Pending [debian] +Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> + +Index: elfutils-0.168/backends/parisc_retval.c +=================================================================== +--- elfutils-0.168.orig/backends/parisc_retval.c ++++ elfutils-0.168/backends/parisc_retval.c +@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die + return nloc_intregpair; + + /* Else fall through. */ +- } ++ } // fallthrough + + case DW_TAG_structure_type: + case DW_TAG_class_type: +Index: elfutils-0.168/backends/mips_retval.c +=================================================================== +--- elfutils-0.168.orig/backends/mips_retval.c ++++ elfutils-0.168/backends/mips_retval.c +@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f + else + return nloc_intregpair; + } +- } ++ } // fallthrough + + /* Fallthrough to handle large types */ + |