diff options
Diffstat (limited to 'kernel/log.h')
-rw-r--r-- | kernel/log.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/log.h b/kernel/log.h index fa02d2396..e61d19b62 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -92,10 +92,10 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi // This is the magic behind the code coverage counters // --------------------------------------------------- -#ifdef YOSYS_ENABLE_COVER +#if defined(YOSYS_ENABLE_COVER) && defined(__linux__) #define cover(_id) do { \ - static CoverData __d YS_ATTRIBUTE(section("yosys_cover_list"), aligned(1), used) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \ + static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1), used)) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \ __d.counter++; \ } while (0) |