Fixes for building on Fedora 26 (Alpha)
cover Fixes for building on Fedora 26 (Alpha)
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
Signature · 1 line
2.9.3
PATCH 1/2 elfutils: fix building elfutils-native with GCC7
Backport a fix from upstream for a -Wformat-truncation=2 warning and implement a simple fix for a -Wimplicit-fallthrough warning.
--- .../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
meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch new file +44 -0
@@ -0,0 +1,44 @@ +From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard <[email protected]> +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 <[email protected]> + +Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95) +Signed-off-by: Joshua Lock <[email protected]> + +--- + 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 <[email protected]>, 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; +
meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch new file +36 -0
@@ -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 <[email protected]> + +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 */ +
meta/recipes-devtools/elfutils/elfutils_0.168.bb +3 -0
@@ -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,
Signature · 1 line
2.9.3
PATCH 2/2 gcc-6.3: backport fix of check for empty string in ubsan.c
In reply to Joshua LockBuilding 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
--- 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
meta/recipes-devtools/gcc/gcc-6.3.inc +1 -0
@@ -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"
meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch new file +28 -0
@@ -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 <[email protected]> + +--- + 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; +
Signature · 1 line
2.9.3
Quoted 6 lines · Joshua Lock
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.
Quoted 3 lines
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.
Quoted 31 lines
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-contribjoshuagl/fedora26
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=joshuagl/fedora26Joshua Lock (2):
elfutils: fix building elfutils-native with GCC7 gcc-6.3: backport fix of check for empty string inubsan.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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 8 lines · Khem Raj
Quoted 6 lines · Joshua Lock
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.
Quoted 6 lines
Quoted 4 lines
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.
Quoted 7 lines
Quoted 4 lines
1. https://fedoraproject.org/wiki/Changes/GCC7
2. https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementationI 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
Quoted 6 lines · Joshua Lock
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.
Quoted 8 lines
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.
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
Quoted 15 lines · Christopher Larson
Quoted 12 lines · Joshua Lock
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.
Quoted 7 lines
Quoted 3 lines
1. https://fedoraproject.org/wiki/Changes/GCC7
2.
https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementationQuite 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.
Quoted 12 lines
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core