1 |
commit: b8401f22eb250e5c0d5c120d4f66e35ea89cf821 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 7 09:34:15 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 7 09:39:06 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8401f22 |
7 |
|
8 |
sys-apps/dtc: tweak for gcc-10, bug #706660 |
9 |
|
10 |
Pull in upstream patch 0e9225eb0dfec5 |
11 |
"Remove redundant YYLOC global declaration". |
12 |
|
13 |
Reported-by: Toralf Förster |
14 |
Closes: https://bugs.gentoo.org/706660 |
15 |
Package-Manager: Portage-2.3.92, Repoman-2.3.20 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
sys-apps/dtc/dtc-1.5.0.ebuild | 3 +- |
19 |
sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch | 50 +++++++++++++++++++++++++++++++ |
20 |
2 files changed, 52 insertions(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/sys-apps/dtc/dtc-1.5.0.ebuild b/sys-apps/dtc/dtc-1.5.0.ebuild |
23 |
index d0d47ebca8e..cbe4052e612 100644 |
24 |
--- a/sys-apps/dtc/dtc-1.5.0.ebuild |
25 |
+++ b/sys-apps/dtc/dtc-1.5.0.ebuild |
26 |
@@ -1,4 +1,4 @@ |
27 |
-# Copyright 1999-2019 Gentoo Authors |
28 |
+# Copyright 1999-2020 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
EAPI=6 |
32 |
@@ -32,6 +32,7 @@ DOCS=" |
33 |
PATCHES=( |
34 |
"${FILESDIR}"/${PN}-1.4.4-posix-shell.patch |
35 |
"${FILESDIR}"/${PN}-1.5.0-fdt_check_full-visibility.patch |
36 |
+ "${FILESDIR}"/${PN}-1.5.0-gcc-10.patch |
37 |
) |
38 |
|
39 |
src_prepare() { |
40 |
|
41 |
diff --git a/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch b/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch |
42 |
new file mode 100644 |
43 |
index 00000000000..80773bfaebb |
44 |
--- /dev/null |
45 |
+++ b/sys-apps/dtc/files/dtc-1.5.0-gcc-10.patch |
46 |
@@ -0,0 +1,50 @@ |
47 |
+https://bugs.gentoo.org/706660 |
48 |
+https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=0e9225eb0dfec51def612b928d2f1836b092bc7e |
49 |
+ |
50 |
+From 0e9225eb0dfec51def612b928d2f1836b092bc7e Mon Sep 17 00:00:00 2001 |
51 |
+From: Dirk Mueller <dmueller@××××.com> |
52 |
+Date: Tue, 14 Jan 2020 18:53:41 +0100 |
53 |
+Subject: Remove redundant YYLOC global declaration |
54 |
+ |
55 |
+gcc 10 will default to -fno-common, which causes this error at link |
56 |
+time: |
57 |
+ |
58 |
+ (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here |
59 |
+ |
60 |
+This is because both dtc-lexer as well as dtc-parser define the same |
61 |
+global symbol yyloc. Before with -fcommon those were merged into one |
62 |
+defintion. The proper solution would be to to mark this as "extern", |
63 |
+however that leads to: |
64 |
+ |
65 |
+ dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] |
66 |
+ 26 | extern YYLTYPE yylloc; |
67 |
+ | ^~~~~~ |
68 |
+In file included from dtc-lexer.l:24: |
69 |
+dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here |
70 |
+ 127 | extern YYLTYPE yylloc; |
71 |
+ | ^~~~~~ |
72 |
+cc1: all warnings being treated as errors |
73 |
+ |
74 |
+which means the declaration is completely redundant and can just be |
75 |
+dropped. |
76 |
+ |
77 |
+Signed-off-by: Dirk Mueller <dmueller@××××.com> |
78 |
+Message-Id: <20200114175341.2994-1-dmueller@××××.com> |
79 |
+Signed-off-by: David Gibson <david@××××××××××××××××××.au> |
80 |
+--- |
81 |
+ dtc-lexer.l | 1 - |
82 |
+ 1 file changed, 1 deletion(-) |
83 |
+ |
84 |
+--- a/dtc-lexer.l |
85 |
++++ b/dtc-lexer.l |
86 |
+@@ -23,7 +23,6 @@ LINECOMMENT "//".*\n |
87 |
+ #include "srcpos.h" |
88 |
+ #include "dtc-parser.tab.h" |
89 |
+ |
90 |
+-YYLTYPE yylloc; |
91 |
+ extern bool treesource_error; |
92 |
+ |
93 |
+ /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ |
94 |
+-- |
95 |
+cgit 1.2-0.3.lf.el7 |
96 |
+ |