diff options
author | George McCollister <george.mccollister@gmail.com> | 2015-06-16 13:12:34 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-26 09:08:42 +0100 |
commit | c8bc2d7913e11278990d1fe82066e26f7fc1c11b (patch) | |
tree | 812ea0b86de65d3aecedae902944305aca0ecffd | |
parent | 8492e143af25bf64d07fc117e7f1607aadf89f09 (diff) | |
download | openembedded-core-c8bc2d7913e11278990d1fe82066e26f7fc1c11b.tar.gz openembedded-core-c8bc2d7913e11278990d1fe82066e26f7fc1c11b.tar.bz2 openembedded-core-c8bc2d7913e11278990d1fe82066e26f7fc1c11b.zip |
binutils: fix native builds when host has gcc5
Cherry pick upstream commit to fix -Werror=logical-not-parentheses error
when building with native gcc5.
(From OE-Core rev: b3bd0dba3139a3e79bfcebe137248c7bdcadf04d)
Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-2.24.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch | 76 |
2 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.24.inc b/meta/recipes-devtools/binutils/binutils-2.24.inc index 63c928712e..2fb56eb4af 100644 --- a/meta/recipes-devtools/binutils/binutils-2.24.inc +++ b/meta/recipes-devtools/binutils/binutils-2.24.inc @@ -40,6 +40,7 @@ SRC_URI = "\ file://binutils_CVE-2014-8503.patch \ file://binutils_CVE-2014-8504.patch \ file://binutils_CVE-2014-8737.patch \ + file://Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch \ " SRC_URI[md5sum] = "e0f71a7b2ddab0f8612336ac81d9636b" diff --git a/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch b/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch new file mode 100644 index 0000000000..0511c39dad --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch @@ -0,0 +1,76 @@ +From 360ddc990a941bc506576f45a3858d38f508410b Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Fri, 12 Sep 2014 09:46:30 +0930 +Subject: [PATCH] Fix tc-i386.c -Werror=logical-not-parentheses error + + * config/tc-i386.c (match_template): Remove redundant "!!" testing + single-bit bitfields. + (build_modrm_byte): Don't compare single-bit bitfields to "1". + +Upstream commit: +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ac4eb736520174305bf6e691827f7473b858cff1 + +Manually resolved gas/ChangeLog conflict by placing the change at the +top of the file. +gas/config/tc-i386.c patched with offset + +Signed-off-by: George McCollister <george.mccollister@gmail.com> +--- + gas/ChangeLog | 6 ++++++ + gas/config/tc-i386.c | 12 ++++++------ + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/gas/ChangeLog b/gas/ChangeLog +index 7fafa26..c6e60c9 100644 +--- a/gas/ChangeLog ++++ b/gas/ChangeLog +@@ -1,3 +1,9 @@ ++2014-09-12 Alan Modra <amodra@gmail.com> ++ ++ * config/tc-i386.c (match_template): Remove redundant "!!" testing ++ single-bit bitfields. ++ (build_modrm_byte): Don't compare single-bit bitfields to "1". ++ + 2013-11-18 H.J. Lu <hongjiu.lu@intel.com> + + * config/tc-i386.c (lex_got): Add a dummy "int bnd_prefix" +diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c +index 3c423da..4464091 100644 +--- a/gas/config/tc-i386.c ++++ b/gas/config/tc-i386.c +@@ -4672,9 +4672,9 @@ match_template (void) + && !operand_types[0].bitfield.regymm + && !operand_types[0].bitfield.regzmm) + || (!operand_types[t->operands > 1].bitfield.regmmx +- && !!operand_types[t->operands > 1].bitfield.regxmm +- && !!operand_types[t->operands > 1].bitfield.regymm +- && !!operand_types[t->operands > 1].bitfield.regzmm)) ++ && operand_types[t->operands > 1].bitfield.regxmm ++ && operand_types[t->operands > 1].bitfield.regymm ++ && operand_types[t->operands > 1].bitfield.regzmm)) + && (t->base_opcode != 0x0fc7 + || t->extension_opcode != 1 /* cmpxchg8b */)) + continue; +@@ -4689,7 +4689,7 @@ match_template (void) + && ((!operand_types[0].bitfield.regmmx + && !operand_types[0].bitfield.regxmm) + || (!operand_types[t->operands > 1].bitfield.regmmx +- && !!operand_types[t->operands > 1].bitfield.regxmm))) ++ && operand_types[t->operands > 1].bitfield.regxmm))) + continue; + + /* Do not verify operands when there are none. */ +@@ -6139,8 +6139,8 @@ build_modrm_byte (void) + op = i.tm.operand_types[vvvv]; + op.bitfield.regmem = 0; + if ((dest + 1) >= i.operands +- || (op.bitfield.reg32 != 1 +- && !op.bitfield.reg64 != 1 ++ || (!op.bitfield.reg32 ++ && op.bitfield.reg64 + && !operand_type_equal (&op, ®xmm) + && !operand_type_equal (&op, ®ymm) + && !operand_type_equal (&op, ®zmm) +-- +2.4.3 + |