mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Make all compile under OpenBSD (#3423)
Co-authored-by: Josuah Demangeon <me@josuah.net>
This commit is contained in:
parent
bc012995b4
commit
29a5947bf8
3 changed files with 50 additions and 3 deletions
|
@ -192,6 +192,13 @@ void yosys_atexit()
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
namespace Yosys {
|
||||
extern char *yosys_argv0;
|
||||
extern char yosys_path[PATH_MAX];
|
||||
};
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::string frontend_command = "auto";
|
||||
|
@ -498,6 +505,12 @@ int main(int argc, char **argv)
|
|||
if (print_stats)
|
||||
log_hasher = new SHA1;
|
||||
|
||||
#if defined(__OpenBSD__)
|
||||
// save the executable origin for proc_self_dirname()
|
||||
yosys_argv0 = argv[0];
|
||||
realpath(yosys_argv0, yosys_path);
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
// set stack size to >= 128 MB
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue