diff options
author | Sebastian Kuzminsky <seb@highlab.com> | 2016-05-14 15:44:13 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-10-17 18:36:13 +0200 |
commit | 512952aa0f55484fc81136170083e2b7abbe9aff (patch) | |
tree | 007877b959b70aa682f8e8cf4c0a580ea8b8c7f9 /kernel/log.cc | |
parent | c5f7d0b13922e9959c23791e069cae4a23d5f88a (diff) |
Change yosys to look for the #define constant "__unix__" instead of "__linux__", to select code appropriate for Unix-like systems. This has been tested with Clang 3.5 and GCC 4.6, 4.8, and 4.9 on Linux, and Clang 3.5 and GCC 4.9 on kFreeBSD.
Gbp-Pq: Name kfreebsd-support.patch
Diffstat (limited to 'kernel/log.cc')
-rw-r--r-- | kernel/log.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/log.cc b/kernel/log.cc index 0ee2170a..1dfa89a4 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -25,7 +25,7 @@ # include <sys/time.h> #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__unix__) || defined(__FreeBSD__) # include <dlfcn.h> #endif @@ -389,7 +389,7 @@ void log_pop() log_flush(); } -#if (defined(__linux__) || defined(__FreeBSD__)) && defined(YOSYS_ENABLE_PLUGINS) +#if (defined(__unix__) || defined(__FreeBSD__)) && defined(YOSYS_ENABLE_PLUGINS) void log_backtrace(const char *prefix, int levels) { if (levels <= 0) return; @@ -584,7 +584,7 @@ void log_wire(RTLIL::Wire *wire, std::string indent) // --------------------------------------------------- // This is the magic behind the code coverage counters // --------------------------------------------------- -#if defined(YOSYS_ENABLE_COVER) && (defined(__linux__) || defined(__FreeBSD__)) +#if defined(YOSYS_ENABLE_COVER) && (defined(__unix__) || defined(__FreeBSD__)) dict<std::string, std::pair<std::string, int>> extra_coverage_data; |