diff --git a/Makefile b/Makefile index c4b46cc13..9e9cc7116 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ CXX = emcc CXXFLAGS := -std=$(CXXSTD) $(filter-out -fPIC -ggdb,$(CXXFLAGS)) ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DABC_MEMALIGN=8 -Wno-c++11-narrowing" EMCC_CXXFLAGS := -Os -Wno-warn-absolute-paths -EMCC_LINKFLAGS := --memory-init-file 0 --embed-file share +EMCC_LINKFLAGS := --embed-file share EMCC_LINKFLAGS += -s NO_EXIT_RUNTIME=1 EMCC_LINKFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg','_memset']" EMCC_LINKFLAGS += -s TOTAL_MEMORY=134217728 diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 20f9791c6..57433d0d9 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -55,7 +55,7 @@ # include #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif @@ -901,10 +901,14 @@ std::string proc_self_dirname() buflen--; return std::string(path, buflen); } -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) std::string proc_self_dirname() { +#ifdef __NetBSD__ + int mib[4] = {CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_PATHNAME}; +#else int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; +#endif size_t buflen; char *buffer; std::string path; diff --git a/passes/equiv/equiv_simple.cc b/passes/equiv/equiv_simple.cc index 2c9d82914..59974a1e6 100644 --- a/passes/equiv/equiv_simple.cc +++ b/passes/equiv/equiv_simple.cc @@ -339,6 +339,8 @@ struct EquivSimplePass : public Pass { CellTypes ct; ct.setup_internals(); ct.setup_stdcells(); + ct.setup_internals_ff(); + ct.setup_stdcells_mem(); for (auto module : design->selected_modules()) {