Skip to contentSkip to conversation

binutils: fix native builds when host has gcc5

PATCH In review Martin Stolpe 3 participants 5 messages Jun 10, 2015 – Jun 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: fix native builds when host has gcc5

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

---
 meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils_2.24.bb +4 -1
index 738aaee..bc34a14 100644
@@ -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
Signature · 1 line
2.4.2
#1 lore raw
Quoted 17 lines · 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.

---
 meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -0
index 738aaee..bc34a14 100644
@@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \

meta/recipes-devtools/binutils/binutils_2.24.bb EXTRA_OECONF += "--with-sysroot=/ \ · line 18

Quoted 10 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +4 -1
+                --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.

Quoted 11 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -1
 do_install_class-native () {
        autotools_do_install
--

2.4.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

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 <[email protected]>:

Quoted 44 lines · Martin Stolpe
Quoted 17 lines

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

---
 meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -0
index 738aaee..bc34a14 100644
@@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \

meta/recipes-devtools/binutils/binutils_2.24.bb EXTRA_OECONF += "--with-sysroot=/ \ · line 18

Quoted 10 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +4 -1
+                --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.

Quoted 11 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -1
 do_install_class-native () {
        autotools_do_install
--

2.4.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 4 lines · Martin Stolpe

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

Quoted 3 lines

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.

Quoted 46 lines

2015-06-10 17:42 GMT+02:00 Khem Raj <[email protected]>:

Quoted 44 lines · Martin Stolpe
Quoted 17 lines

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

---
 meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -0
index 738aaee..bc34a14 100644
@@ -7,12 +7,15 @@ EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
                 --enable-install-libiberty \
                 --enable-shared \

meta/recipes-devtools/binutils/binutils_2.24.bb EXTRA_OECONF += "--with-sysroot=/ \ · line 18

Quoted 10 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +4 -1
+                --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.

Quoted 11 lines
meta/recipes-devtools/binutils/binutils_2.24.bb +0 -1
 do_install_class-native () {
        autotools_do_install
--

2.4.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
In reply to Martin Stolpe

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

Quoted 31 lines · 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.

---
  meta/recipes-devtools/binutils/binutils_2.24.bb | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils_2.24.bb +4 -1
index 738aaee..bc34a14 100644
@@ -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