diff options
author | Cody P Schafer <dev@codyps.com> | 2017-06-07 16:36:44 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-29 16:50:53 +0100 |
commit | 72084f751303405416938c776f6c1bf5b8842536 (patch) | |
tree | 3f74568bc9f3bbe1efa7755344958bc3651b194b /meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch | |
parent | 5f7d84821f7c53ce2250861c5e08da9eac928993 (diff) | |
download | poky-72084f751303405416938c776f6c1bf5b8842536.tar.gz |
elfutils: fix building elfutils-native with GCC7
This is heavily based on the oe-core master commit with the same
subject, but includes a backport of upstream's fix for the fallthrough
warnings rebased to 0.166 (the oe-core patch which targeted 0.168 did
not apply), a rebase of the format-truncation patch, and a backport of
the upstream format-length patch.
Info from OE-Core master patch follows:
From OE-Core rev: aaf4c4f3d09ac3897205417eb15e19d54e0c0d05
From: Joshua Lock <joshua.g.lock@intel.com>
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>
(From OE-Core rev: 3b91be97ae8c36cd6bad86fed992efc9800f4c9e)
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch')
-rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch new file mode 100644 index 0000000000..b2623f9d2e --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.166/fallthrough.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through, | ||
2 | however this causes warnings (which are promoted to errors) with the elfutils | ||
3 | patches from Debian for mips and parisc, which use fallthrough's by design. | ||
4 | |||
5 | Explicitly mark the intentional fallthrough switch cases with a comment to | ||
6 | disable the warnings where the fallthrough behaviour is desired. | ||
7 | |||
8 | Upstream-Status: Pending [debian] | ||
9 | Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> | ||
10 | |||
11 | Index: elfutils-0.168/backends/parisc_retval.c | ||
12 | =================================================================== | ||
13 | --- elfutils-0.168.orig/backends/parisc_retval.c | ||
14 | +++ elfutils-0.168/backends/parisc_retval.c | ||
15 | @@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die | ||
16 | return nloc_intregpair; | ||
17 | |||
18 | /* Else fall through. */ | ||
19 | - } | ||
20 | + } // fallthrough | ||
21 | |||
22 | case DW_TAG_structure_type: | ||
23 | case DW_TAG_class_type: | ||
24 | Index: elfutils-0.168/backends/mips_retval.c | ||
25 | =================================================================== | ||
26 | --- elfutils-0.168.orig/backends/mips_retval.c | ||
27 | +++ elfutils-0.168/backends/mips_retval.c | ||
28 | @@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f | ||
29 | else | ||
30 | return nloc_intregpair; | ||
31 | } | ||
32 | - } | ||
33 | + } // fallthrough | ||
34 | |||
35 | /* Fallthrough to handle large types */ | ||
36 | |||