From 4cd7f275b13b62d7babe2a6b060629be3a9aefa6 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Feb 04 2016 19:59:41 +0000 Subject: Fix GCC 6 --- diff --git a/fish.spec b/fish.spec index 9d8c0ea..d269011 100644 --- a/fish.spec +++ b/fish.spec @@ -1,6 +1,6 @@ Name: fish Version: 2.2.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A friendly interactive shell Group: System Environment/Shells @@ -21,6 +21,9 @@ Patch0: fish-use-usrbinpython3.patch Patch1: pr-2393-1.patch Patch2: pr-2393-2.patch +# Fix C++11 build +Patch3: fish_tests_c++11.patch + %if 0%{?rhel} BuildRequires: python34-devel %global __python %{__python34} @@ -47,6 +50,7 @@ nothing to learn or configure. %patch0 -p1 %patch1 -p2 %patch2 -p2 +%patch3 -p2 # This is unused. If we fiddle with Python versions, its presence will # be confusing. @@ -55,7 +59,7 @@ rm create_wajig_completions.py %build %configure --docdir=%{_pkgdocdir} -make %{?_smp_mflags} all fish_tests +make all fish_tests %install @@ -108,6 +112,9 @@ fi %{_pkgdocdir} %changelog +* Thu Feb 04 2016 luto@kernel.org - 2.2.0-10 +- Fix build on GCC 6 + * Wed Feb 03 2016 Fedora Release Engineering - 2.2.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/fish_tests_c++11.patch b/fish_tests_c++11.patch new file mode 100644 index 0000000..c46f7e9 --- /dev/null +++ b/fish_tests_c++11.patch @@ -0,0 +1,23 @@ +commit 7ff972511a6dd62f9a2623d86595575fb400b879 +Author: Andy Lutomirski +Date: Thu Feb 4 11:52:42 2016 -0800 + + fish_tests: Explicitly cast -2 to wchar_t + + On arm, wchar_t is unsigned, and C++11 and newer disallow implicit + narrowing conversions inside braces. Use an explicit conversion to + fix the build on GCC 6 and up, which defaults to C++11. + +diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp +index 90d9dadc30e6..521825516ce3 100644 +--- a/src/fish_tests.cpp ++++ b/src/fish_tests.cpp +@@ -1154,7 +1154,7 @@ static void test_utf8() + wchar_t w4[] = {0x15555, 0xf7777, 0xa}; + wchar_t w5[] = {0x255555, 0x1fa04ff, 0xddfd04, 0xa}; + wchar_t w6[] = {0xf255555, 0x1dfa04ff, 0x7fddfd04, 0xa}; +- wchar_t wb[] = {-2, 0xa, (wchar_t)0xffffffff, 0x0441}; ++ wchar_t wb[] = {(wchar_t)-2, 0xa, (wchar_t)0xffffffff, 0x0441}; + wchar_t wm[] = {0x41, 0x0441, 0x3042, 0xff67, 0x9b0d, 0x2e05da67}; + wchar_t wb1[] = {0xa, 0x0422}; + wchar_t wb2[] = {0xd800, 0xda00, 0x41, 0xdfff, 0xa};