summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Rui <vowstar@gmail.com>2020-01-30 15:32:15 +0800
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-17 07:23:23 +0000
commit4202315a5c0a34f3ce0be67ef3216efbae1c6532 (patch)
tree76a267d943f5e2bbcdb21fa1dd41fc5f59429eba /sci-electronics/iverilog
parentdev-python/hypothesis: Bump to 5.5.4 (diff)
downloadgentoo-4202315a5c0a34f3ce0be67ef3216efbae1c6532.tar.gz
gentoo-4202315a5c0a34f3ce0be67ef3216efbae1c6532.tar.bz2
gentoo-4202315a5c0a34f3ce0be67ef3216efbae1c6532.zip
sci-electronics/iverilog: fix 10.3 gcc-10 build problem
gcc-10 and above flipped a default from -fcommon to -fno-common: https://gcc.gnu.org/PR85678 Usually all it takes is to add a few 'extern' declarations and move definitions from header files to modules. I've port iverilog to gcc-10. Closes: https://bugs.gentoo.org/706366 Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Huang Rui <vowstar@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14619 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sci-electronics/iverilog')
-rw-r--r--sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch33
-rw-r--r--sci-electronics/iverilog/iverilog-10.3.ebuild1
2 files changed, 34 insertions, 0 deletions
diff --git a/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch b/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch
new file mode 100644
index 000000000000..3bb06c6db42c
--- /dev/null
+++ b/sci-electronics/iverilog/files/iverilog-10.3-fno-common.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/706366
+--- a/driver/cflexor.lex
++++ b/driver/cflexor.lex
+@@ -27,6 +27,8 @@
+ # include "globals.h"
+ # include <string.h>
+
++char *current_file = NULL;
++
+ static int comment_enter;
+ static char* trim_trailing_white(char*txt, int trim);
+
+--- a/driver/cfparse_misc.h
++++ b/driver/cfparse_misc.h
+@@ -39,6 +39,6 @@ int cferror(const char *);
+ int cfparse(void);
+ void switch_to_command_file(const char *);
+ void destroy_lexor(void);
+-char *current_file;
++extern char *current_file;
+
+ #endif /* IVL_cfparse_misc_H */
+--- a/libveriuser/priv.h
++++ b/libveriuser/priv.h
+@@ -31,6 +31,6 @@ extern char* __acc_newstring(const char*txt);
+ /*
+ * Trace file for logging ACC and TF calls.
+ */
+-FILE* pli_trace;
++extern FILE* pli_trace;
+
+ #endif /* IVL_priv_H */
+
diff --git a/sci-electronics/iverilog/iverilog-10.3.ebuild b/sci-electronics/iverilog/iverilog-10.3.ebuild
index ae61d822ad4f..b5e65f56c2eb 100644
--- a/sci-electronics/iverilog/iverilog-10.3.ebuild
+++ b/sci-electronics/iverilog/iverilog-10.3.ebuild
@@ -40,6 +40,7 @@ DEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-10.3-file-missing.patch #705412
+ "${FILESDIR}"/${PN}-10.3-fno-common.patch #706366
)
src_prepare() {