ath9k_htc: Add patch for GCC 6.3.0
authorJason Self <j@jxself.org>
Wed, 10 Jan 2018 03:51:54 +0000 (19:51 -0800)
committerJason Self <j@jxself.org>
Wed, 10 Jan 2018 03:51:54 +0000 (19:51 -0800)
ISO C++ forbids comparison between pointer and integer.

ath9k_htc/Makefile
ath9k_htc/local/patches/gcc.patch2 [new file with mode: 0644]

index 9469c40deeb473e1998613672ff54abf1e5705be..ee5e61b7e9d2d1a97f5414c16cbce2536b9bf3b5 100644 (file)
@@ -27,7 +27,7 @@ GCC_VER=6.3.0
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2
 GCC_TAR=gcc-$(GCC_VER).tar.bz2
 GCC_DIR=gcc-$(GCC_VER)
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2
 GCC_TAR=gcc-$(GCC_VER).tar.bz2
 GCC_DIR=gcc-$(GCC_VER)
-GCC_PATCHES=local/patches/gcc.patch local/patches/gcc-6.3.0_fixup.patch
+GCC_PATCHES=local/patches/gcc.patch local/patches/gcc-6.3.0_fixup.patch local/patches/gcc.patch2
 GCC_SUM=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f
 
 BASEDIR=$(shell pwd)
 GCC_SUM=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f
 
 BASEDIR=$(shell pwd)
diff --git a/ath9k_htc/local/patches/gcc.patch2 b/ath9k_htc/local/patches/gcc.patch2
new file mode 100644 (file)
index 0000000..4d82574
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/gcc/ubsan.c b/gcc/ubsan.c
+index 56637d8..1093824 100644
+--- a/gcc/ubsan.c
++++ b/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;