Skip to content

Commit

Permalink
Add #include <cerrno> in verilated.h
Browse files Browse the repository at this point in the history
Related to the error of verilator#2255:
/usr/bin/ld: _ZN9Verilated3t_sE: TLS reference in ... mismatches non-TLS definition in verilated.o section .bss

Adding `#include <errno.h>` does not seem to provide a consistent fix - I think that the `#include <cerrno>` of verilated.cpp provides a conflicting definition of `errno` in some edge-cases. Adding the identical include in verilated.h (seems to) fix the error.
  • Loading branch information
mortbopet committed Jun 30, 2021
1 parent 2825940 commit c134d3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/verilated.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <memory>
#include <string>
#include <vector>
#include <cerrno>
// <iostream> avoided to reduce compile time
// <map> avoided and instead in verilated_heavy.h to reduce compile time
// <string> avoided and instead in verilated_heavy.h to reduce compile time
Expand Down

0 comments on commit c134d3d

Please sign in to comment.