summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2016-06-07 15:27:41 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2016-08-19 09:49:12 +0000
commit31603f60201c3fc90c66ee30a62ccb02cbb18e14 (patch)
tree3a5b6ab46f6dac669397307bd3bd7e9e5112237c
parentb5957b4d81a0dbe2c0c55e783d6ce0ee97f34fcd (diff)
downloadmeta-boot2qt-31603f60201c3fc90c66ee30a62ccb02cbb18e14.tar.gz
binutils: fix native builds when host has gcc5
Cherry pick upstream commit to fix -Werror=logical-not-parentheses error when building with native gcc5. Taken from oe/fido, since this has not been applied in dizzy. Task-number: QTBUG-53862 Change-Id: I5e6e267e689d43389556fd806883dc93f120ed19 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
-rw-r--r--recipes/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch76
-rw-r--r--recipes/binutils/binutils_2.24.bbappend27
2 files changed, 103 insertions, 0 deletions
diff --git a/recipes/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch b/recipes/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch
new file mode 100644
index 0000000..0511c39
--- /dev/null
+++ b/recipes/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch
@@ -0,0 +1,76 @@
1From 360ddc990a941bc506576f45a3858d38f508410b Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Fri, 12 Sep 2014 09:46:30 +0930
4Subject: [PATCH] Fix tc-i386.c -Werror=logical-not-parentheses error
5
6 * config/tc-i386.c (match_template): Remove redundant "!!" testing
7 single-bit bitfields.
8 (build_modrm_byte): Don't compare single-bit bitfields to "1".
9
10Upstream commit:
11https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ac4eb736520174305bf6e691827f7473b858cff1
12
13Manually resolved gas/ChangeLog conflict by placing the change at the
14top of the file.
15gas/config/tc-i386.c patched with offset
16
17Signed-off-by: George McCollister <george.mccollister@gmail.com>
18---
19 gas/ChangeLog | 6 ++++++
20 gas/config/tc-i386.c | 12 ++++++------
21 2 files changed, 12 insertions(+), 6 deletions(-)
22
23diff --git a/gas/ChangeLog b/gas/ChangeLog
24index 7fafa26..c6e60c9 100644
25--- a/gas/ChangeLog
26+++ b/gas/ChangeLog
27@@ -1,3 +1,9 @@
28+2014-09-12 Alan Modra <amodra@gmail.com>
29+
30+ * config/tc-i386.c (match_template): Remove redundant "!!" testing
31+ single-bit bitfields.
32+ (build_modrm_byte): Don't compare single-bit bitfields to "1".
33+
34 2013-11-18 H.J. Lu <hongjiu.lu@intel.com>
35
36 * config/tc-i386.c (lex_got): Add a dummy "int bnd_prefix"
37diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
38index 3c423da..4464091 100644
39--- a/gas/config/tc-i386.c
40+++ b/gas/config/tc-i386.c
41@@ -4672,9 +4672,9 @@ match_template (void)
42 && !operand_types[0].bitfield.regymm
43 && !operand_types[0].bitfield.regzmm)
44 || (!operand_types[t->operands > 1].bitfield.regmmx
45- && !!operand_types[t->operands > 1].bitfield.regxmm
46- && !!operand_types[t->operands > 1].bitfield.regymm
47- && !!operand_types[t->operands > 1].bitfield.regzmm))
48+ && operand_types[t->operands > 1].bitfield.regxmm
49+ && operand_types[t->operands > 1].bitfield.regymm
50+ && operand_types[t->operands > 1].bitfield.regzmm))
51 && (t->base_opcode != 0x0fc7
52 || t->extension_opcode != 1 /* cmpxchg8b */))
53 continue;
54@@ -4689,7 +4689,7 @@ match_template (void)
55 && ((!operand_types[0].bitfield.regmmx
56 && !operand_types[0].bitfield.regxmm)
57 || (!operand_types[t->operands > 1].bitfield.regmmx
58- && !!operand_types[t->operands > 1].bitfield.regxmm)))
59+ && operand_types[t->operands > 1].bitfield.regxmm)))
60 continue;
61
62 /* Do not verify operands when there are none. */
63@@ -6139,8 +6139,8 @@ build_modrm_byte (void)
64 op = i.tm.operand_types[vvvv];
65 op.bitfield.regmem = 0;
66 if ((dest + 1) >= i.operands
67- || (op.bitfield.reg32 != 1
68- && !op.bitfield.reg64 != 1
69+ || (!op.bitfield.reg32
70+ && op.bitfield.reg64
71 && !operand_type_equal (&op, &regxmm)
72 && !operand_type_equal (&op, &regymm)
73 && !operand_type_equal (&op, &regzmm)
74--
752.4.3
76
diff --git a/recipes/binutils/binutils_2.24.bbappend b/recipes/binutils/binutils_2.24.bbappend
new file mode 100644
index 0000000..5d37646
--- /dev/null
+++ b/recipes/binutils/binutils_2.24.bbappend
@@ -0,0 +1,27 @@
1#############################################################################
2##
3## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4##
5## This file is part of the Qt Enterprise Embedded Scripts of the Qt
6## framework.
7##
8## $QT_BEGIN_LICENSE$
9## Commercial License Usage Only
10## Licensees holding valid commercial Qt license agreements with Digia
11## with an appropriate addendum covering the Qt Enterprise Embedded Scripts,
12## may use this file in accordance with the terms contained in said license
13## agreement.
14##
15## For further information use the contact form at
16## http://www.qt.io/contact-us.
17##
18##
19## $QT_END_LICENSE$
20##
21#############################################################################
22
23FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
24
25SRC_URI += "\
26 file://Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch \
27 "