diff --git a/Makefile b/Makefile index c0760eb2f51..1861612a336 100644 --- a/Makefile +++ b/Makefile @@ -305,7 +305,7 @@ endif else ifeq ($(CONFIG),mxe) PKG_CONFIG = /usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-pkg-config CXX = /usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-g++ -CXXFLAGS += -std=$(CXXSTD) $(OPT_LEVEL) -D_POSIX_SOURCE -DYOSYS_MXE_HACKS -Wno-attributes +CXXFLAGS += -std=$(CXXSTD) $(OPT_LEVEL) -D_POSIX_SOURCE -Wno-attributes CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS)) LINKFLAGS := $(filter-out -rdynamic,$(LINKFLAGS)) -s LIBS := $(filter-out -lrt,$(LIBS)) diff --git a/kernel/driver.cc b/kernel/driver.cc index a6b94868e4a..6565c472c2a 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -31,6 +31,10 @@ # include #endif +#ifdef YOSYS_ENABLE_TCL +# include +#endif + #include #include #include diff --git a/kernel/tclapi.cc b/kernel/tclapi.cc index 91874d5b910..be39ca4a08c 100644 --- a/kernel/tclapi.cc +++ b/kernel/tclapi.cc @@ -22,8 +22,9 @@ #include "libs/json11/json11.hpp" #ifdef YOSYS_ENABLE_TCL -#include "tclTomMath.h" -#include "tclTomMathDecls.h" +#include +#include +#include #endif YOSYS_NAMESPACE_BEGIN diff --git a/kernel/yosys.cc b/kernel/yosys.cc index bba01681819..bdd7303aa45 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -29,6 +29,10 @@ # include #endif +#ifdef YOSYS_ENABLE_TCL +# include +#endif + #ifdef YOSYS_ENABLE_PLUGINS # include #endif diff --git a/kernel/yosys.h b/kernel/yosys.h index 903540a9e4d..d0359aea8c8 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -43,6 +43,10 @@ #include "kernel/rtlil.h" #include "kernel/register.h" +#ifdef YOSYS_ENABLE_TCL +struct Tcl_Interp; +#endif + YOSYS_NAMESPACE_BEGIN void yosys_setup(); diff --git a/kernel/yosys_common.h b/kernel/yosys_common.h index b0fbc3f1969..29dcd58c55a 100644 --- a/kernel/yosys_common.h +++ b/kernel/yosys_common.h @@ -65,29 +65,6 @@ #define FRIEND_TEST(test_case_name, test_name) \ friend class test_case_name##_##test_name##_Test -#ifdef YOSYS_ENABLE_TCL -# include -# ifdef YOSYS_MXE_HACKS -extern Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); -extern Tcl_Interp *Tcl_CreateInterp(void); -extern void Tcl_Preserve(ClientData data); -extern void Tcl_Release(ClientData clientData); -extern int Tcl_InterpDeleted(Tcl_Interp *interp); -extern void Tcl_DeleteInterp(Tcl_Interp *interp); -extern int Tcl_Eval(Tcl_Interp *interp, const char *script); -extern int Tcl_EvalFile(Tcl_Interp *interp, const char *fileName); -extern void Tcl_Finalize(void); -extern int Tcl_GetCommandInfo(Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr); -extern const char *Tcl_GetStringResult(Tcl_Interp *interp); -extern Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length); -extern Tcl_Obj *Tcl_NewIntObj(int intValue); -extern Tcl_Obj *Tcl_NewListObj(int objc, Tcl_Obj *const objv[]); -extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags); -# endif -# undef CONST -# undef INLINE -#endif - #ifdef _WIN32 # undef NOMINMAX # define NOMINMAX 1