1 |
commit: 4202315a5c0a34f3ce0be67ef3216efbae1c6532 |
2 |
Author: Huang Rui <vowstar <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jan 30 07:32:15 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 17 07:23:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4202315a |
7 |
|
8 |
sci-electronics/iverilog: fix 10.3 gcc-10 build problem |
9 |
|
10 |
gcc-10 and above flipped a default from -fcommon to -fno-common: |
11 |
https://gcc.gnu.org/PR85678 |
12 |
Usually all it takes is to add a few 'extern' declarations and |
13 |
move definitions from header files to modules. I've port iverilog |
14 |
to gcc-10. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/706366 |
17 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
18 |
Signed-off-by: Huang Rui <vowstar <AT> gmail.com> |
19 |
Closes: https://github.com/gentoo/gentoo/pull/14619 |
20 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
21 |
|
22 |
.../iverilog/files/iverilog-10.3-fno-common.patch | 33 ++++++++++++++++++++++ |
23 |
sci-electronics/iverilog/iverilog-10.3.ebuild | 1 + |
24 |
2 files changed, 34 insertions(+) |
25 |
|
26 |
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch b/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..3bb06c6db42 |
29 |
--- /dev/null |
30 |
+++ b/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch |
31 |
@@ -0,0 +1,33 @@ |
32 |
+https://bugs.gentoo.org/706366 |
33 |
+--- a/driver/cflexor.lex |
34 |
++++ b/driver/cflexor.lex |
35 |
+@@ -27,6 +27,8 @@ |
36 |
+ # include "globals.h" |
37 |
+ # include <string.h> |
38 |
+ |
39 |
++char *current_file = NULL; |
40 |
++ |
41 |
+ static int comment_enter; |
42 |
+ static char* trim_trailing_white(char*txt, int trim); |
43 |
+ |
44 |
+--- a/driver/cfparse_misc.h |
45 |
++++ b/driver/cfparse_misc.h |
46 |
+@@ -39,6 +39,6 @@ int cferror(const char *); |
47 |
+ int cfparse(void); |
48 |
+ void switch_to_command_file(const char *); |
49 |
+ void destroy_lexor(void); |
50 |
+-char *current_file; |
51 |
++extern char *current_file; |
52 |
+ |
53 |
+ #endif /* IVL_cfparse_misc_H */ |
54 |
+--- a/libveriuser/priv.h |
55 |
++++ b/libveriuser/priv.h |
56 |
+@@ -31,6 +31,6 @@ extern char* __acc_newstring(const char*txt); |
57 |
+ /* |
58 |
+ * Trace file for logging ACC and TF calls. |
59 |
+ */ |
60 |
+-FILE* pli_trace; |
61 |
++extern FILE* pli_trace; |
62 |
+ |
63 |
+ #endif /* IVL_priv_H */ |
64 |
+ |
65 |
|
66 |
diff --git a/sci-electronics/iverilog/iverilog-10.3.ebuild b/sci-electronics/iverilog/iverilog-10.3.ebuild |
67 |
index ae61d822ad4..b5e65f56c2e 100644 |
68 |
--- a/sci-electronics/iverilog/iverilog-10.3.ebuild |
69 |
+++ b/sci-electronics/iverilog/iverilog-10.3.ebuild |
70 |
@@ -40,6 +40,7 @@ DEPEND=" |
71 |
|
72 |
PATCHES=( |
73 |
"${FILESDIR}"/${PN}-10.3-file-missing.patch #705412 |
74 |
+ "${FILESDIR}"/${PN}-10.3-fno-common.patch #706366 |
75 |
) |
76 |
|
77 |
src_prepare() { |