[oe-commits] [openembedded-core] 22/68: binutils: Fix build with clang

git at git.openembedded.org git at git.openembedded.org
Mon Jan 28 17:07:21 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud-next
in repository openembedded-core.

commit 86a4ecad734087cff7d5c1d6109f6256b8e2b75b
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu Dec 6 19:12:33 2018 -0800

    binutils: Fix build with clang
    
    (From OE-Core rev: 208dadb8f1864aca88c69766f3bfb37a2ef4953c)
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-devtools/binutils/binutils-2.31.inc   |  1 +
 .../binutils/binutils/clang-bfd-fix.patch          | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/meta/recipes-devtools/binutils/binutils-2.31.inc b/meta/recipes-devtools/binutils/binutils-2.31.inc
index 0c9d4ce..c3c15fb 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 = "\
      file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \
      file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \
      file://0021-PLT-information-was-still-being-generated-when-symbo.patch \
+     file://clang-bfd-fix.patch \
      file://CVE-2018-17358.patch \
      file://CVE-2018-17360.patch \
      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 0000000..caf7848
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch
@@ -0,0 +1,32 @@
+Fix compiler error seen with clang, The return value of this
+function is not checked anywhere so in a way its useless but
+still technically correct to return a value here
+
+Fixes
+
+../../bfd/reloc.c:1638:7: error: non-void function '_bfd_clear_contents' should return a value [-Wreturn-type]
+      return;
+      ^
+1 error generated.
+
+It has been fixed in master along with a larger cleanup and fix for relocations
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1dc9e2d63e37839ff1768346b2e3f52e338baba5
+
+Upstream-Status: Backport [Fixes differently]
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+
+Index: git/bfd/reloc.c
+===================================================================
+--- git.orig/bfd/reloc.c
++++ git/bfd/reloc.c
+@@ -1635,7 +1635,7 @@ _bfd_clear_contents (reloc_howto_type *h
+     default:
+       abort ();
+     case 0:
+-      return;
++      return 0;
+     case 1:
+       x = bfd_get_8 (input_bfd, location);
+       break;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list