From: Clifford Wolf Date: Mon, 29 Dec 2014 01:46:59 +0000 (+0100) Subject: gcc build fixes X-Git-Tag: yosys-0.5~192 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=397ae5b697e9923bb9d35df425370efd9357b127;p=yosys.git gcc build fixes --- diff --git a/kernel/yosys.h b/kernel/yosys.h index 8ddd6f540..700a0603d 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -124,6 +125,8 @@ YOSYS_NAMESPACE_BEGIN +// Note: All headers included in hashlib.h must be included +// outside of YOSYS_NAMESPACE before this or bad things will happen. #ifdef HASHLIB_H # undef HASHLIB_H # include "kernel/hashlib.h" @@ -165,17 +168,19 @@ using RTLIL::Cell; using RTLIL::Module; using RTLIL::Design; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; - -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; -template<> struct hash_ops : hash_obj_ops {}; +namespace hashlib { + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; + template<> struct hash_ops : hash_obj_ops {}; +} void memhasher_on(); void memhasher_off();