All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixes for building on Fedora 26 (Alpha)
@ 2017-04-06 13:23 Joshua Lock
  2017-04-06 13:23 ` [PATCH 1/2] elfutils: fix building elfutils-native with GCC7 Joshua Lock
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Joshua Lock @ 2017-04-06 13:23 UTC (permalink / raw)
  To: openembedded-core

As Fedora 26 has a new gcc [1] and a new system pkg-config implementation [2] I
wanted to do some testing on that host OS so that we might be able to get some
fixes in before Pyro/2.3 is released.

The following series were the only changes required to start building (I have 
tested core-image-minimal, core-image-base and core-image-sato) on Fedora 26.

1. https://fedoraproject.org/wiki/Changes/GCC7
2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation

The following changes since commit 633ad6c9f436f5d2b6ee1a005b697661a054a394:

  oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdir (2017-04-06 10:13:39 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib joshuagl/fedora26
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=joshuagl/fedora26

Joshua Lock (2):
  elfutils: fix building elfutils-native with GCC7
  gcc-6.3: backport fix of check for empty string in ubsan.c

 .../elfutils-0.168/Fix_one_GCC7_warning.patch      | 44 ++++++++++++++++++++++
 .../elfutils/elfutils-0.168/fallthrough.patch      | 36 ++++++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.168.bb   |  3 ++
 meta/recipes-devtools/gcc/gcc-6.3.inc              |  1 +
 .../gcc/gcc-6.3/ubsan-fix-check-empty-string.patch | 28 ++++++++++++++
 5 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch

-- 
2.9.3


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

* [PATCH 1/2] elfutils: fix building elfutils-native with GCC7
  2017-04-06 13:23 [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Joshua Lock
@ 2017-04-06 13:23 ` Joshua Lock
  2017-04-06 13:23 ` [PATCH 2/2] gcc-6.3: backport fix of check for empty string in ubsan.c Joshua Lock
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2017-04-06 13:23 UTC (permalink / raw)
  To: openembedded-core

Backport a fix from upstream for a -Wformat-truncation=2 warning
and implement a simple fix for a -Wimplicit-fallthrough warning.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 .../elfutils-0.168/Fix_one_GCC7_warning.patch      | 44 ++++++++++++++++++++++
 .../elfutils/elfutils-0.168/fallthrough.patch      | 36 ++++++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.168.bb   |  3 ++
 3 files changed, 83 insertions(+)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
new file mode 100644
index 0000000..d88f4eb
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
@@ -0,0 +1,44 @@
+From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 12 Feb 2017 21:51:34 +0100
+Subject: [PATCH] libasm: Fix one GCC7 -Wformat-truncation=2 warning.
+
+Make sure that if we have really lots of labels the tempsym doesn't get
+truncated because it is too small to hold the whole name.
+
+This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed
+out by enabling this warning because there are currently some issues
+with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95)
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+---
+ libasm/ChangeLog    | 6 +++++-
+ libasm/asm_newsym.c | 6 ++++--
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+Index: elfutils-0.168/libasm/asm_newsym.c
+===================================================================
+--- elfutils-0.168.orig/libasm/asm_newsym.c
++++ elfutils-0.168/libasm/asm_newsym.c
+@@ -1,5 +1,5 @@
+ /* Define new symbol for current position in given section.
+-   Copyright (C) 2002, 2005, 2016 Red Hat, Inc.
++   Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc.
+    This file is part of elfutils.
+    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
+ 
+@@ -44,7 +44,9 @@ AsmSym_t *
+ asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
+ 	    int type, int binding)
+ {
+-#define TEMPSYMLEN 10
++/* We don't really expect labels with many digits, but in theory it could
++   be 10 digits (plus ".L" and a zero terminator).  */
++#define TEMPSYMLEN 13
+   char tempsym[TEMPSYMLEN];
+   AsmSym_t *result;
+ 
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch
new file mode 100644
index 0000000..b2623f9
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch
@@ -0,0 +1,36 @@
+GCC7 adds -Wimplicit-fallthrough to warn when a switch case falls through,
+however this causes warnings (which are promoted to errors) with the elfutils
+patches from Debian for mips and parisc, which use fallthrough's by design.
+
+Explicitly mark the intentional fallthrough switch cases with a comment to
+disable the warnings where the fallthrough behaviour is desired.
+
+Upstream-Status: Pending [debian]
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+Index: elfutils-0.168/backends/parisc_retval.c
+===================================================================
+--- elfutils-0.168.orig/backends/parisc_retval.c
++++ elfutils-0.168/backends/parisc_retval.c
+@@ -166,7 +166,7 @@ parisc_return_value_location_ (Dwarf_Die
+ 	  return nloc_intregpair;
+ 
+ 	/* Else fall through.  */
+-      }
++      } // fallthrough
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+Index: elfutils-0.168/backends/mips_retval.c
+===================================================================
+--- elfutils-0.168.orig/backends/mips_retval.c
++++ elfutils-0.168/backends/mips_retval.c
+@@ -387,7 +387,7 @@ mips_return_value_location (Dwarf_Die *f
+               else
+                 return nloc_intregpair;
+             }
+-        }
++        } // fallthrough
+ 
+       /* Fallthrough to handle large types */
+ 
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.168.bb b/meta/recipes-devtools/elfutils/elfutils_0.168.bb
index 9557933..3b8f2a3 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.168.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.168.bb
@@ -17,6 +17,7 @@ SRC_URI += "\
         file://0001-remove-the-unneed-checking.patch \
         file://0001-fix-a-stack-usage-warning.patch \
         file://aarch64_uio.patch \
+        file://Fix_one_GCC7_warning.patch \
         file://shadow.patch \
 "
 
@@ -35,6 +36,8 @@ SRC_URI += "\
         file://debian/hurd_path.patch \
         file://debian/ignore_strmerge.diff \
 "
+# Fix the patches from Debian with GCC7
+SRC_URI += "file://fallthrough.patch"
 SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
 
 # The buildsystem wants to generate 2 .h files from source using a binary it just built,
-- 
2.9.3



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

* [PATCH 2/2] gcc-6.3: backport fix of check for empty string in ubsan.c
  2017-04-06 13:23 [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Joshua Lock
  2017-04-06 13:23 ` [PATCH 1/2] elfutils: fix building elfutils-native with GCC7 Joshua Lock
@ 2017-04-06 13:23 ` Joshua Lock
  2017-04-06 13:50 ` [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Khem Raj
  2017-04-07 14:02 ` Christopher Larson
  3 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2017-04-06 13:23 UTC (permalink / raw)
  To: openembedded-core

Building gcc-cross-initial with GCC7 on the host fails due to the
comparison of a pointer to an integer in ubsan_use_new_style_p, which
is forbidden by ISO C++:

ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and
integer [-fpermissive]
       || xloc.file == '\0' || xloc.file[0] == '\xff'

Backport the fix from upstream GCC to enable the build with GCC 7

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
---
 meta/recipes-devtools/gcc/gcc-6.3.inc              |  1 +
 .../gcc/gcc-6.3/ubsan-fix-check-empty-string.patch | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch

diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc
index da7a083..71d0aff 100644
--- a/meta/recipes-devtools/gcc/gcc-6.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.3.inc
@@ -84,6 +84,7 @@ SRC_URI = "\
 "
 BACKPORTS = "\
            file://CVE-2016-6131.patch \
+           file://ubsan-fix-check-empty-string.patch \
 "
 SRC_URI[md5sum] = "677a7623c7ef6ab99881bc4e048debb6"
 SRC_URI[sha256sum] = "f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f"
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch b/meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch
new file mode 100644
index 0000000..c012719
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch
@@ -0,0 +1,28 @@
+From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001
+From: kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 3 Sep 2016 10:57:05 +0000
+Subject: [PATCH] gcc/ 	* ubsan.c (ubsan_use_new_style_p): Fix check for empty
+ string.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+---
+ gcc/ubsan.c   | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+Index: gcc-6.3.0/gcc/ubsan.c
+===================================================================
+--- gcc-6.3.0.orig/gcc/ubsan.c
++++ gcc-6.3.0/gcc/ubsan.c
+@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
+ 
+   expanded_location xloc = expand_location (loc);
+   if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
+-      || xloc.file == '\0' || xloc.file[0] == '\xff'
++      || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
+       || xloc.file[1] == '\xff')
+     return false;
+ 
-- 
2.9.3



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

* Re: [PATCH 0/2] Fixes for building on Fedora 26 (Alpha)
  2017-04-06 13:23 [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Joshua Lock
  2017-04-06 13:23 ` [PATCH 1/2] elfutils: fix building elfutils-native with GCC7 Joshua Lock
  2017-04-06 13:23 ` [PATCH 2/2] gcc-6.3: backport fix of check for empty string in ubsan.c Joshua Lock
@ 2017-04-06 13:50 ` Khem Raj
  2017-04-07 10:06   ` Joshua Lock
  2017-04-07 14:02 ` Christopher Larson
  3 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2017-04-06 13:50 UTC (permalink / raw)
  To: Joshua Lock; +Cc: Patches and discussions about the oe-core layer

On Thu, Apr 6, 2017 at 6:23 AM, Joshua Lock <joshua.g.lock@intel.com> wrote:
> As Fedora 26 has a new gcc [1] and a new system pkg-config implementation [2] I
> wanted to do some testing on that host OS so that we might be able to get some
> fixes in before Pyro/2.3 is released.
>
> The following series were the only changes required to start building (I have
> tested core-image-minimal, core-image-base and core-image-sato) on Fedora 26.

gcc patch looks fine to me.

>
> 1. https://fedoraproject.org/wiki/Changes/GCC7
> 2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation

I think we should think about making pkgconf as default too for OE in
next release cycle.

>
> The following changes since commit 633ad6c9f436f5d2b6ee1a005b697661a054a394:
>
>   oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdir (2017-04-06 10:13:39 +0100)
>
> are available in the git repository at:
>
>   git://git.yoctoproject.org/poky-contrib joshuagl/fedora26
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=joshuagl/fedora26
>
> Joshua Lock (2):
>   elfutils: fix building elfutils-native with GCC7
>   gcc-6.3: backport fix of check for empty string in ubsan.c
>
>  .../elfutils-0.168/Fix_one_GCC7_warning.patch      | 44 ++++++++++++++++++++++
>  .../elfutils/elfutils-0.168/fallthrough.patch      | 36 ++++++++++++++++++
>  meta/recipes-devtools/elfutils/elfutils_0.168.bb   |  3 ++
>  meta/recipes-devtools/gcc/gcc-6.3.inc              |  1 +
>  .../gcc/gcc-6.3/ubsan-fix-check-empty-string.patch | 28 ++++++++++++++
>  5 files changed, 112 insertions(+)
>  create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch
>  create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch
>  create mode 100644 meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch
>
> --
> 2.9.3
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 0/2] Fixes for building on Fedora 26 (Alpha)
  2017-04-06 13:50 ` [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Khem Raj
@ 2017-04-07 10:06   ` Joshua Lock
  0 siblings, 0 replies; 7+ messages in thread
From: Joshua Lock @ 2017-04-07 10:06 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Thu, 2017-04-06 at 06:50 -0700, Khem Raj wrote:
> On Thu, Apr 6, 2017 at 6:23 AM, Joshua Lock <joshua.g.lock@intel.com>
> wrote:
> > As Fedora 26 has a new gcc [1] and a new system pkg-config
> > implementation [2] I
> > wanted to do some testing on that host OS so that we might be able
> > to get some
> > fixes in before Pyro/2.3 is released.
> > 
> > The following series were the only changes required to start
> > building (I have
> > tested core-image-minimal, core-image-base and core-image-sato) on
> > Fedora 26.
> 
> gcc patch looks fine to me.

Thanks for the review.

> > 
> > 1. https://fedoraproject.org/wiki/Changes/GCC7
> > 2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-con
> > fig_implementation
> 
> I think we should think about making pkgconf as default too for OE in
> next release cycle.

I've filed that as a 2.4 enhancement bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11308

Joshua


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

* Re: [PATCH 0/2] Fixes for building on Fedora 26 (Alpha)
  2017-04-06 13:23 [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Joshua Lock
                   ` (2 preceding siblings ...)
  2017-04-06 13:50 ` [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Khem Raj
@ 2017-04-07 14:02 ` Christopher Larson
  2017-04-07 14:23   ` Khem Raj
  3 siblings, 1 reply; 7+ messages in thread
From: Christopher Larson @ 2017-04-07 14:02 UTC (permalink / raw)
  To: Joshua Lock; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

On Thu, Apr 6, 2017 at 6:23 AM, Joshua Lock <joshua.g.lock@intel.com> wrote:

> As Fedora 26 has a new gcc [1] and a new system pkg-config implementation
> [2] I
> wanted to do some testing on that host OS so that we might be able to get
> some
> fixes in before Pyro/2.3 is released.
>
> The following series were the only changes required to start building (I
> have
> tested core-image-minimal, core-image-base and core-image-sato) on Fedora
> 26.
>
> 1. https://fedoraproject.org/wiki/Changes/GCC7
> 2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_
> implementation


Quite interesting. I started poking at pkgconf a while back —
https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconf.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1684 bytes --]

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

* Re: [PATCH 0/2] Fixes for building on Fedora 26 (Alpha)
  2017-04-07 14:02 ` Christopher Larson
@ 2017-04-07 14:23   ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2017-04-07 14:23 UTC (permalink / raw)
  To: Christopher Larson
  Cc: Joshua Lock, Patches and discussions about the oe-core layer

On Fri, Apr 7, 2017 at 7:02 AM, Christopher Larson <kergoth@gmail.com> wrote:
>
>
> On Thu, Apr 6, 2017 at 6:23 AM, Joshua Lock <joshua.g.lock@intel.com> wrote:
>>
>> As Fedora 26 has a new gcc [1] and a new system pkg-config implementation
>> [2] I
>> wanted to do some testing on that host OS so that we might be able to get
>> some
>> fixes in before Pyro/2.3 is released.
>>
>> The following series were the only changes required to start building (I
>> have
>> tested core-image-minimal, core-image-base and core-image-sato) on Fedora
>> 26.
>>
>> 1. https://fedoraproject.org/wiki/Changes/GCC7
>> 2.
>> https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation
>
>
> Quite interesting. I started poking at pkgconf a while back —
> https://github.com/kergoth/meta-kergoth-wip/tree/master/meta-pkgconf.

Thanks Chris, I think this is almost there then
a little bit of rework and proposal for 2.4. I think
you should own this feature for next release if you
have time.

> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


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

end of thread, other threads:[~2017-04-07 14:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 13:23 [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Joshua Lock
2017-04-06 13:23 ` [PATCH 1/2] elfutils: fix building elfutils-native with GCC7 Joshua Lock
2017-04-06 13:23 ` [PATCH 2/2] gcc-6.3: backport fix of check for empty string in ubsan.c Joshua Lock
2017-04-06 13:50 ` [PATCH 0/2] Fixes for building on Fedora 26 (Alpha) Khem Raj
2017-04-07 10:06   ` Joshua Lock
2017-04-07 14:02 ` Christopher Larson
2017-04-07 14:23   ` Khem Raj

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.