1 |
commit: 9daa45a18156494207a6fd10be4931681c71a890 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 21:42:16 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 21:42:28 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9daa45a1 |
7 |
|
8 |
app-editors/hteditor: fix build failure on g++-6/powerpc (noticed by iv_) |
9 |
|
10 |
The patch is proposed upstream as |
11 |
https://github.com/sebastianbiallas/ht/pull/21 |
12 |
|
13 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
14 |
|
15 |
.../files/hteditor-2.1.0-gcc-6-uchar.patch | 45 ++++++++++++++++++++++ |
16 |
app-editors/hteditor/hteditor-2.1.0.ebuild | 1 + |
17 |
2 files changed, 46 insertions(+) |
18 |
|
19 |
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..67eaa6e0149 |
22 |
--- /dev/null |
23 |
+++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch |
24 |
@@ -0,0 +1,45 @@ |
25 |
+https://github.com/sebastianbiallas/ht/pull/21 |
26 |
+ |
27 |
+From 7ce68c4bca7fd64c0073f1770c6b5761c03174f0 Mon Sep 17 00:00:00 2001 |
28 |
+From: Sergei Trofimovich <slyfox@g.o> |
29 |
+Date: Wed, 21 Mar 2018 21:30:31 +0000 |
30 |
+Subject: [PATCH] ht: fix build failure on -funsigned-char platforms |
31 |
+ |
32 |
+powerpc (and arm) have 'char' == 'unsigned char' by default. |
33 |
+This causes build failures on c++11: |
34 |
+ |
35 |
+``` |
36 |
+$ ./configure CFLAGS=-funsigned-char CXXFLAGS=-funsigned-char |
37 |
+$ make |
38 |
+ |
39 |
+g++ -DHAVE_CONFIG_H -I. -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -DNOMACROS -pipe -O3 -fomit-frame-pointer -Wall -fsigned-char -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++14 -Woverloaded-virtual -Wnon-virtual-dtor -funsigned-char -MT htcoffhd.o -MD -MP -MF .deps/htcoffhd.Tpo -c -o htcoffhd.o htcoffhd.cc |
40 |
+htcoffhd.cc:93:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] |
41 |
+ }; |
42 |
+ ^ |
43 |
+htcoffhd.cc:131:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] |
44 |
+ }; |
45 |
+``` |
46 |
+ |
47 |
+Use 'signed char' explicitly to maintain existing behavior. |
48 |
+ |
49 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
50 |
+--- |
51 |
+ httag.h | 2 +- |
52 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
53 |
+ |
54 |
+diff --git a/httag.h b/httag.h |
55 |
+index 7f5da1c..83e5c22 100644 |
56 |
+--- a/httag.h |
57 |
++++ b/httag.h |
58 |
+@@ -69,7 +69,7 @@ struct ht_tag_flags { |
59 |
+ } PACKED; |
60 |
+ |
61 |
+ struct ht_tag_flags_s { |
62 |
+- char bitidx; |
63 |
++ signed char bitidx; |
64 |
+ const char *desc; |
65 |
+ } PACKED; |
66 |
+ |
67 |
+-- |
68 |
+2.16.2 |
69 |
+ |
70 |
|
71 |
diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild |
72 |
index 5e5d0e08308..1f5fc5b5ee5 100644 |
73 |
--- a/app-editors/hteditor/hteditor-2.1.0.ebuild |
74 |
+++ b/app-editors/hteditor/hteditor-2.1.0.ebuild |
75 |
@@ -30,6 +30,7 @@ S=${WORKDIR}/${MY_P} |
76 |
PATCHES=( |
77 |
"${FILESDIR}"/${P}-gcc-7.patch |
78 |
"${FILESDIR}"/${P}-tinfo.patch |
79 |
+ "${FILESDIR}"/${P}-gcc-6-uchar.patch |
80 |
) |
81 |
|
82 |
src_prepare() { |