All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][fido] binutils: fix native builds when host has gcc5
@ 2015-06-16 18:12 George McCollister
  0 siblings, 0 replies; 6+ messages in thread
From: George McCollister @ 2015-06-16 18:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: martin.stolpe

Cherry pick upstream commit to fix -Werror=logical-not-parentheses error
when building with native gcc5.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/recipes-devtools/binutils/binutils-2.24.inc   |  1 +
 ...86.c-Werror-logical-not-parentheses-error.patch | 76 ++++++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 meta/recipes-devtools/binutils/binutils/Fix-tc-i386.c-Werror-logical-not-parentheses-error.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.24.inc b/meta/recipes-devtools/binutils/binutils-2.24.inc
index 63c9287..2fb56eb 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 0000000..0511c39
--- /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, &regxmm)
+ 		      && !operand_type_equal (&op, &regymm)
+ 		      && !operand_type_equal (&op, &regzmm)
+-- 
+2.4.3
+
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [fido] binutils: fix native builds when host has gcc5
  2015-06-10 14:26 [PATCH] [fido] " Martin Stolpe
  2015-06-10 15:42 ` Khem Raj
@ 2015-06-17 11:52 ` Joshua Lock
  1 sibling, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2015-06-17 11:52 UTC (permalink / raw)
  To: openembedded-core

Hi Martin,

Instead of taking this I've queued a patch in my fido/next branch from 
George McCollister's patch[2] which backports a fix from upstream instead.

With this I'm able to build binutils-native on a Fedora 22 laptop.

Cheers,

Joshua

1. 
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=joshuagl/fido-next
2. 
http://lists.openembedded.org/pipermail/openembedded-core/2015-June/106168.html

On 10/06/15 15:26, Martin Stolpe wrote:
> Problem is that when building binutils using GCC >=5.0
> warnings will be treated as errors which will cause
> the build to fail.
>
> Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
> ---
>   meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/binutils/binutils_2.24.bb b/meta/recipes-devtools/binutils/binutils_2.24.bb
> index 738aaee..bc34a14 100644
> --- a/meta/recipes-devtools/binutils/binutils_2.24.bb
> +++ b/meta/recipes-devtools/binutils/binutils_2.24.bb
> @@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
>                   --enable-install-libbfd \
>                   --enable-install-libiberty \
>                   --enable-shared \
> +                --disable-werror \
>                   "
>
>   EXTRA_OECONF_class-native = "--enable-targets=all \
>                                --enable-64-bit-bfd \
>                                --enable-install-libiberty \
> -                             --enable-install-libbfd"
> +                             --enable-install-libbfd \
> +                             --disable-werror \
> +                             "
>
>   do_install_class-native () {
>   	autotools_do_install
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [fido] binutils: fix native builds when host has gcc5
  2015-06-11  5:27   ` Martin Stolpe
@ 2015-06-12 14:34     ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2015-06-12 14:34 UTC (permalink / raw)
  To: Martin Stolpe
  Cc: Martin Stolpe, Patches and discussions about the oe-core layer

On Thu, Jun 11, 2015 at 1:27 AM, Martin Stolpe <martinstolpe@gmail.com> wrote:
> Yes, it would be better to fix these warnings. But on the other hand
> this patch would just restore the previous behavior. So as a long term
> solution I agree with you that these warnings should be fixed but why
> not use a workaround until the problems are fixed?

who will fix it ? you have a problem at hand you are tackling try to
see if it can be dealt with best possible way.

 I wouldn't dare to
> try to fix these warnings on my own as these are just my first steps
> with Yocto and programming and I wouldn't be confident that my changes
> would be correct.

Even if this workaround has to be persisted then just contain the
workaround to native variants, and only for fido, it should not go
into master at all.

>
> 2015-06-10 17:42 GMT+02:00 Khem Raj <raj.khem@gmail.com>:
>> On Wed, Jun 10, 2015 at 10:26 AM, Martin Stolpe <martinstolpe@gmail.com> wrote:
>>> Problem is that when building binutils using GCC >=5.0
>>> warnings will be treated as errors which will cause
>>> the build to fail.
>>>
>>> Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
>>> ---
>>>  meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-devtools/binutils/binutils_2.24.bb b/meta/recipes-devtools/binutils/binutils_2.24.bb
>>> index 738aaee..bc34a14 100644
>>> --- a/meta/recipes-devtools/binutils/binutils_2.24.bb
>>> +++ b/meta/recipes-devtools/binutils/binutils_2.24.bb
>>> @@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
>>>                  --enable-install-libbfd \
>>>                  --enable-install-libiberty \
>>>                  --enable-shared \
>>> +                --disable-werror \
>>>                  "
>>>
>>>  EXTRA_OECONF_class-native = "--enable-targets=all \
>>>                               --enable-64-bit-bfd \
>>>                               --enable-install-libiberty \
>>> -                             --enable-install-libbfd"
>>> +                             --enable-install-libbfd \
>>> +                             --disable-werror \
>>> +                             "
>>
>> lowering the guards is not the right approach. I understand you want
>> to compile fido with distros that are released after fido.
>> but better would be to backport relevant fixed into component itself.
>>
>>>
>>>  do_install_class-native () {
>>>         autotools_do_install
>>> --
>>> 2.4.2
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [fido] binutils: fix native builds when host has gcc5
  2015-06-10 15:42 ` Khem Raj
@ 2015-06-11  5:27   ` Martin Stolpe
  2015-06-12 14:34     ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Stolpe @ 2015-06-11  5:27 UTC (permalink / raw)
  To: Khem Raj; +Cc: Martin Stolpe, Patches and discussions about the oe-core layer

Yes, it would be better to fix these warnings. But on the other hand
this patch would just restore the previous behavior. So as a long term
solution I agree with you that these warnings should be fixed but why
not use a workaround until the problems are fixed? I wouldn't dare to
try to fix these warnings on my own as these are just my first steps
with Yocto and programming and I wouldn't be confident that my changes
would be correct.

2015-06-10 17:42 GMT+02:00 Khem Raj <raj.khem@gmail.com>:
> On Wed, Jun 10, 2015 at 10:26 AM, Martin Stolpe <martinstolpe@gmail.com> wrote:
>> Problem is that when building binutils using GCC >=5.0
>> warnings will be treated as errors which will cause
>> the build to fail.
>>
>> Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
>> ---
>>  meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-devtools/binutils/binutils_2.24.bb b/meta/recipes-devtools/binutils/binutils_2.24.bb
>> index 738aaee..bc34a14 100644
>> --- a/meta/recipes-devtools/binutils/binutils_2.24.bb
>> +++ b/meta/recipes-devtools/binutils/binutils_2.24.bb
>> @@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
>>                  --enable-install-libbfd \
>>                  --enable-install-libiberty \
>>                  --enable-shared \
>> +                --disable-werror \
>>                  "
>>
>>  EXTRA_OECONF_class-native = "--enable-targets=all \
>>                               --enable-64-bit-bfd \
>>                               --enable-install-libiberty \
>> -                             --enable-install-libbfd"
>> +                             --enable-install-libbfd \
>> +                             --disable-werror \
>> +                             "
>
> lowering the guards is not the right approach. I understand you want
> to compile fido with distros that are released after fido.
> but better would be to backport relevant fixed into component itself.
>
>>
>>  do_install_class-native () {
>>         autotools_do_install
>> --
>> 2.4.2
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [fido] binutils: fix native builds when host has gcc5
  2015-06-10 14:26 [PATCH] [fido] " Martin Stolpe
@ 2015-06-10 15:42 ` Khem Raj
  2015-06-11  5:27   ` Martin Stolpe
  2015-06-17 11:52 ` Joshua Lock
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2015-06-10 15:42 UTC (permalink / raw)
  To: Martin Stolpe
  Cc: Martin Stolpe, Patches and discussions about the oe-core layer

On Wed, Jun 10, 2015 at 10:26 AM, Martin Stolpe <martinstolpe@gmail.com> wrote:
> Problem is that when building binutils using GCC >=5.0
> warnings will be treated as errors which will cause
> the build to fail.
>
> Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
> ---
>  meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/binutils/binutils_2.24.bb b/meta/recipes-devtools/binutils/binutils_2.24.bb
> index 738aaee..bc34a14 100644
> --- a/meta/recipes-devtools/binutils/binutils_2.24.bb
> +++ b/meta/recipes-devtools/binutils/binutils_2.24.bb
> @@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
>                  --enable-install-libbfd \
>                  --enable-install-libiberty \
>                  --enable-shared \
> +                --disable-werror \
>                  "
>
>  EXTRA_OECONF_class-native = "--enable-targets=all \
>                               --enable-64-bit-bfd \
>                               --enable-install-libiberty \
> -                             --enable-install-libbfd"
> +                             --enable-install-libbfd \
> +                             --disable-werror \
> +                             "

lowering the guards is not the right approach. I understand you want
to compile fido with distros that are released after fido.
but better would be to backport relevant fixed into component itself.

>
>  do_install_class-native () {
>         autotools_do_install
> --
> 2.4.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] [fido] binutils: fix native builds when host has gcc5
@ 2015-06-10 14:26 Martin Stolpe
  2015-06-10 15:42 ` Khem Raj
  2015-06-17 11:52 ` Joshua Lock
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Stolpe @ 2015-06-10 14:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Stolpe

Problem is that when building binutils using GCC >=5.0
warnings will be treated as errors which will cause
the build to fail.

Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
---
 meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/binutils/binutils_2.24.bb b/meta/recipes-devtools/binutils/binutils_2.24.bb
index 738aaee..bc34a14 100644
--- a/meta/recipes-devtools/binutils/binutils_2.24.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.24.bb
@@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \
+                --disable-werror \
                 "
 
 EXTRA_OECONF_class-native = "--enable-targets=all \
                              --enable-64-bit-bfd \
                              --enable-install-libiberty \
-                             --enable-install-libbfd"
+                             --enable-install-libbfd \
+                             --disable-werror \
+                             "
 
 do_install_class-native () {
 	autotools_do_install
-- 
2.4.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-17 11:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 18:12 [PATCH][fido] binutils: fix native builds when host has gcc5 George McCollister
  -- strict thread matches above, loose matches on Subject: below --
2015-06-10 14:26 [PATCH] [fido] " Martin Stolpe
2015-06-10 15:42 ` Khem Raj
2015-06-11  5:27   ` Martin Stolpe
2015-06-12 14:34     ` Khem Raj
2015-06-17 11:52 ` Joshua Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.