iverilog/libveriuser
Huang Rui 2c0995caca Fix fails to build with -fno-common or gcc-10
See also: https://bugs.gentoo.org/706366

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 accroding to this guide:
https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

To fix this, I analyzed the code, and found ``pli_trace`` has been
defined at here:
https://github.com/steveicarus/iverilog/blob/v10_3/libveriuser/priv.c#L24

So I changed ``FILE* pli_trace;`` to ``extern FILE* pli_trace;``.

The var ``current_file`` only in ``cfparse_misc.h``, I changed it
from ``char *current_file;`` to ``extern char *current_file;`` and
declaring it in cflexor.lex

And then it works.

Signed-off-by: Huang Rui <vowstar@gmail.com>
(cherry picked from commit d49d26a5c5)
2020-01-30 18:43:24 +00:00
..
Makefile.in Enable checks for VPI const-correctness. 2018-10-06 11:56:35 +01:00
a_close.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_compare_handles.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_configure.c Add some minor VPI/ACC fixes and updates 2014-04-06 15:54:05 -07:00
a_fetch_argc.c Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00
a_fetch_argv.c Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00
a_fetch_dir.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_fetch_fullname.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_fetch_location.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_fetch_param.c Use uintptr_t/intptr_t when casting between pointer and integer. 2015-05-05 23:00:09 +01:00
a_fetch_range.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_fetch_tfarg.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_fetch_time.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_fetch_type.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_fetch_type_str.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_fetch_value.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_handle_by_name.c Remove some cppcheck reduce scope warnings. 2012-08-31 12:12:08 -07:00
a_handle_hiconn.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_handle_object.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_handle_parent.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_handle_simulated_net.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_handle_tfarg.c Remove some cppcheck reduce scope warnings. 2012-08-31 12:12:08 -07:00
a_initialize.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_next.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_next_bit.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_next_port.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_next_topmod.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_object_of_type.c Add support for a generate scope to vvp and the vpi routines. 2013-07-17 10:57:02 -07:00
a_product_version.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_set_value.c updated FSF-address 2012-08-29 10:12:10 -07:00
a_vcl.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
a_version.c updated FSF-address 2012-08-29 10:12:10 -07:00
asynch.c updated FSF-address 2012-08-29 10:12:10 -07:00
config.h.in Update header files to use a more standard name to prevent rereading 2014-07-23 13:42:56 -07:00
delay.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
exprinfo.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
finish.c updated FSF-address 2012-08-29 10:12:10 -07:00
getcstringp.c updated FSF-address 2012-08-29 10:12:10 -07:00
getinstance.c updated FSF-address 2012-08-29 10:12:10 -07:00
getlongp.c updated FSF-address 2012-08-29 10:12:10 -07:00
getp.c updated FSF-address 2012-08-29 10:12:10 -07:00
getsimtime.c Spelling fixes in C and C++ comments 2015-06-04 15:00:29 -07:00
io_print.c Remove missing parameter warnings 2014-07-09 14:16:57 -07:00
math.c updated FSF-address 2012-08-29 10:12:10 -07:00
mc_scan_plusargs.c Fix some cppcheck warnings 2013-04-15 11:54:15 -07:00
nodeinfo.c Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00
nump.c Easy changes for -Wmissing-prototypes 2014-07-10 14:07:30 -07:00
priv.c updated FSF-address 2012-08-29 10:12:10 -07:00
priv.h Fix fails to build with -fno-common or gcc-10 2020-01-30 18:43:24 +00:00
putlongp.c updated FSF-address 2012-08-29 10:12:10 -07:00
putp.c updated FSF-address 2012-08-29 10:12:10 -07:00
spname.c updated FSF-address 2012-08-29 10:12:10 -07:00
typep.c updated FSF-address 2012-08-29 10:12:10 -07:00
veriusertfs.c Fix invalid cast of TF sizetf callback. 2018-10-08 22:10:17 +01:00
workarea.c updated FSF-address 2012-08-29 10:12:10 -07:00