summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPaul Kocialkowki <contact@paulk.fr>2017-06-06 16:39:46 +0300
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-06-08 23:29:15 +0200
commit37afb270b461314978ce741cffa3b896673eb829 (patch)
treeafa2e0ec327beff1a1ba183cc8fd69df167497a4 /util
parent2e7f6ccafc3e633ed9001b3c3863253ee0630429 (diff)
downloadcoreboot-37afb270b461314978ce741cffa3b896673eb829.tar.xz
crossgcc: Resolve pointer and integer comparison in GCC
GCC version 7 is being a bit picky about pointer and integer comparison by default, which triggers a crossgcc build error. This backports a patch from upstream GCC to fix the issue. Change-Id: I8b1e806c10604c0df080ac5edc667bf1141e2c17 Signed-off-by: Paul Kocialkowki <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/20103 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util')
-rw-r--r--util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch b/util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch
new file mode 100644
index 0000000000..f34d6cc36e
--- /dev/null
+++ b/util/crossgcc/patches/gcc-6.3.0_pointer_integer.patch
@@ -0,0 +1,27 @@
+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
+---
+ gcc/ubsan.c | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/ubsan.c b/gcc/ubsan.c
+index 5cbc98dbabb..d3bd8e3393d 100644
+--- a/gcc/ubsan.c
++++ b/gcc/ubsan.c
+@@ -1469,7 +1469,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.13.0
+