summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2017-04-06 14:23:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-10 23:00:43 +0100
commitf70179e280b5f518ae160f0d14496f2a730c8140 (patch)
tree533cd2442f7b8cd1b3fddec4c260fdc87e776c6c /meta/recipes-devtools
parent5784961762205ee000cbbfc115b0b356fd4ea197 (diff)
downloadpoky-f70179e280b5f518ae160f0d14496f2a730c8140.tar.gz
gcc-6.3: backport fix of check for empty string in ubsan.c
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 (From OE-Core rev: 7a7fcbab0365b9501c737dbc02715be14dda72a3) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc
index da7a083c08..71d0affb89 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 = "\
84" 84"
85BACKPORTS = "\ 85BACKPORTS = "\
86 file://CVE-2016-6131.patch \ 86 file://CVE-2016-6131.patch \
87 file://ubsan-fix-check-empty-string.patch \
87" 88"
88SRC_URI[md5sum] = "677a7623c7ef6ab99881bc4e048debb6" 89SRC_URI[md5sum] = "677a7623c7ef6ab99881bc4e048debb6"
89SRC_URI[sha256sum] = "f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f" 90SRC_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 0000000000..c0127198e0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch
@@ -0,0 +1,28 @@
1From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001
2From: kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Sat, 3 Sep 2016 10:57:05 +0000
4Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty
5 string.
6
7git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4
8
9Upstream-Status: Backport
10Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
11
12---
13 gcc/ubsan.c | 2 +-
14 2 files changed, 5 insertions(+), 1 deletion(-)
15
16Index: gcc-6.3.0/gcc/ubsan.c
17===================================================================
18--- gcc-6.3.0.orig/gcc/ubsan.c
19+++ gcc-6.3.0/gcc/ubsan.c
20@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
21
22 expanded_location xloc = expand_location (loc);
23 if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
24- || xloc.file == '\0' || xloc.file[0] == '\xff'
25+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
26 || xloc.file[1] == '\xff')
27 return false;
28