diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-12-06 19:12:33 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-08 17:17:01 +0000 |
commit | 665ff326099c63e18efc158678383774ff9f3450 (patch) | |
tree | 1f8bf699dd132f61a8f4d4c4fc2324f5a0c4d8cb /meta/recipes-devtools | |
parent | 78037fd6105c5ce66d85a1bbe16a37dc0e046f84 (diff) | |
download | poky-665ff326099c63e18efc158678383774ff9f3450.tar.gz |
binutils: Fix build with clang
(From OE-Core rev: 208dadb8f1864aca88c69766f3bfb37a2ef4953c)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.31.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.31.inc b/meta/recipes-devtools/binutils/binutils-2.31.inc index 0c9d4cef21..c3c15fb416 100644 --- a/meta/recipes-devtools/binutils/binutils-2.31.inc +++ b/meta/recipes-devtools/binutils/binutils-2.31.inc | |||
@@ -41,6 +41,7 @@ SRC_URI = "\ | |||
41 | file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \ | 41 | file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \ |
42 | file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \ | 42 | file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \ |
43 | file://0021-PLT-information-was-still-being-generated-when-symbo.patch \ | 43 | file://0021-PLT-information-was-still-being-generated-when-symbo.patch \ |
44 | file://clang-bfd-fix.patch \ | ||
44 | file://CVE-2018-17358.patch \ | 45 | file://CVE-2018-17358.patch \ |
45 | file://CVE-2018-17360.patch \ | 46 | file://CVE-2018-17360.patch \ |
46 | file://CVE-2018-18309.patch \ | 47 | file://CVE-2018-18309.patch \ |
diff --git a/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch b/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch new file mode 100644 index 0000000000..caf78488df --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Fix compiler error seen with clang, The return value of this | ||
2 | function is not checked anywhere so in a way its useless but | ||
3 | still technically correct to return a value here | ||
4 | |||
5 | Fixes | ||
6 | |||
7 | ../../bfd/reloc.c:1638:7: error: non-void function '_bfd_clear_contents' should return a value [-Wreturn-type] | ||
8 | return; | ||
9 | ^ | ||
10 | 1 error generated. | ||
11 | |||
12 | It has been fixed in master along with a larger cleanup and fix for relocations | ||
13 | |||
14 | https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1dc9e2d63e37839ff1768346b2e3f52e338baba5 | ||
15 | |||
16 | Upstream-Status: Backport [Fixes differently] | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Index: git/bfd/reloc.c | ||
21 | =================================================================== | ||
22 | --- git.orig/bfd/reloc.c | ||
23 | +++ git/bfd/reloc.c | ||
24 | @@ -1635,7 +1635,7 @@ _bfd_clear_contents (reloc_howto_type *h | ||
25 | default: | ||
26 | abort (); | ||
27 | case 0: | ||
28 | - return; | ||
29 | + return 0; | ||
30 | case 1: | ||
31 | x = bfd_get_8 (input_bfd, location); | ||
32 | break; | ||