diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-08-30 21:00:23 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-08-30 21:00:23 +0200 |
commit | 2025291e69b14e2dc3880a6dc24726ed0735f527 (patch) | |
tree | bdaaa0ab9cec1a43c09fb6bd3f408c2f952ab359 /debian | |
parent | 78bfe0de96fa5c6a7e53689ef53deaeac1d0a7b8 (diff) |
Fix patches after importing new version
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/0007-Disable-pretty-build.patch | 6 | ||||
-rw-r--r-- | debian/patches/0009-Some-spelling-errors-fixed.patch | 14 | ||||
-rw-r--r-- | debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch | 4 | ||||
-rw-r--r-- | debian/patches/0010-Fix-reproducibility-of-PDF-documents-in-yosys-doc.patch | 4 | ||||
-rw-r--r-- | debian/patches/0011-Do-not-show-g-build-flags-in-Version-string.patch | 16 | ||||
-rw-r--r-- | debian/patches/01_gitrevision.patch | 14 | ||||
-rw-r--r-- | debian/patches/02_removeabc.patch | 10 | ||||
-rw-r--r-- | debian/patches/05_abc_executable.patch | 10 | ||||
-rw-r--r-- | debian/patches/kfreebsd-support.patch | 106 |
9 files changed, 87 insertions, 97 deletions
diff --git a/debian/patches/0007-Disable-pretty-build.patch b/debian/patches/0007-Disable-pretty-build.patch index 7c16ac9e..1191bdfd 100644 --- a/debian/patches/0007-Disable-pretty-build.patch +++ b/debian/patches/0007-Disable-pretty-build.patch @@ -7,10 +7,10 @@ Subject: Disable pretty build 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index f26a6e0..8979641 100644 +index b021cd4..d95e368 100644 --- a/Makefile +++ b/Makefile -@@ -41,7 +41,7 @@ EXTRA_OBJS = +@@ -52,7 +52,7 @@ EXTRA_OBJS = EXTRA_TARGETS = TARGETS = yosys$(EXE) yosys-config @@ -18,4 +18,4 @@ index f26a6e0..8979641 100644 +PRETTY = 0 SMALL = 0 - all: top-all + # Unit test diff --git a/debian/patches/0009-Some-spelling-errors-fixed.patch b/debian/patches/0009-Some-spelling-errors-fixed.patch index d99a2f65..163c21c2 100644 --- a/debian/patches/0009-Some-spelling-errors-fixed.patch +++ b/debian/patches/0009-Some-spelling-errors-fixed.patch @@ -11,11 +11,11 @@ Subject: Some spelling errors fixed 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc -index a617215..6f03f25 100644 +index 44e4e5f..ea468ed 100644 --- a/backends/verilog/verilog_backend.cc +++ b/backends/verilog/verilog_backend.cc -@@ -1253,7 +1253,7 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module) - active_module = module; +@@ -1402,7 +1402,7 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module) + } if (!module->processes.empty()) - log_warning("Module %s contains unmapped RTLIL proccesses. RTLIL processes\n" @@ -24,10 +24,10 @@ index a617215..6f03f25 100644 "changes in simulation behavior are possible! Use \"proc\" to convert\n" "processes to logic networks and registers.", log_id(module)); diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc -index 4666c81..c130a57 100644 +index 0a5bd84..e90c87a 100644 --- a/frontends/liberty/liberty.cc +++ b/frontends/liberty/liberty.cc -@@ -575,7 +575,7 @@ struct LibertyFrontend : public Frontend { +@@ -615,7 +615,7 @@ struct LibertyFrontend : public Frontend { LibertyAst *bus_type_node = node->find("bus_type"); if (!bus_type_node || !type_map.count(bus_type_node->value)) @@ -63,10 +63,10 @@ index 8af8ccd..3452ccb 100644 -signed mark ports (A, B) that are declared as signed (using the [AB]_SIGNED diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc -index 3a3939a..9170ad8 100644 +index a488732..58acd30 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc -@@ -618,7 +618,7 @@ struct ShowPass : public Pass { +@@ -623,7 +623,7 @@ struct ShowPass : public Pass { log(" assigned to each unique value of this attribute.\n"); log("\n"); log(" -width\n"); diff --git a/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch b/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch index 9ffefdbc..0b46c4a0 100644 --- a/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch +++ b/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch @@ -7,14 +7,14 @@ Subject: Fix adding of sys.path in yosys-smtbmc 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/smt2/Makefile.inc b/backends/smt2/Makefile.inc -index eacda27..f98e610 100644 +index dce82f0..f98e610 100644 --- a/backends/smt2/Makefile.inc +++ b/backends/smt2/Makefile.inc @@ -6,7 +6,7 @@ ifneq ($(CONFIG),emcc) TARGETS += yosys-smtbmc yosys-smtbmc: backends/smt2/smtbmc.py -- $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new +- $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(os.path.realpath(__file__)) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new + $(P) sed 's|##yosys-sys-path##|sys.path += ["/usr/share/yosys"]|;' < $< > $@.new $(Q) chmod +x $@.new $(Q) mv $@.new $@ diff --git a/debian/patches/0010-Fix-reproducibility-of-PDF-documents-in-yosys-doc.patch b/debian/patches/0010-Fix-reproducibility-of-PDF-documents-in-yosys-doc.patch index 87082429..0eebf558 100644 --- a/debian/patches/0010-Fix-reproducibility-of-PDF-documents-in-yosys-doc.patch +++ b/debian/patches/0010-Fix-reproducibility-of-PDF-documents-in-yosys-doc.patch @@ -11,10 +11,10 @@ Subject: Fix reproducibility of PDF documents in yosys-doc 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile -index 8979641..aa66a54 100644 +index d95e368..4719844 100644 --- a/Makefile +++ b/Makefile -@@ -463,9 +463,9 @@ update-manual: $(TARGETS) $(EXTRA_TARGETS) +@@ -632,9 +632,9 @@ update-manual: $(TARGETS) $(EXTRA_TARGETS) cd manual && ../yosys -p 'help -write-tex-command-reference-manual' manual: $(TARGETS) $(EXTRA_TARGETS) diff --git a/debian/patches/0011-Do-not-show-g-build-flags-in-Version-string.patch b/debian/patches/0011-Do-not-show-g-build-flags-in-Version-string.patch index 92bde35e..ece49fb1 100644 --- a/debian/patches/0011-Do-not-show-g-build-flags-in-Version-string.patch +++ b/debian/patches/0011-Do-not-show-g-build-flags-in-Version-string.patch @@ -7,10 +7,10 @@ Subject: Do not show g++ build flags in Version string 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile -index aa66a54..2d4a1ff 100644 +index 4719844..34ba839 100644 --- a/Makefile +++ b/Makefile -@@ -370,15 +370,16 @@ libyosys.so: $(filter-out kernel/driver.o,$(OBJS)) +@@ -498,8 +498,7 @@ libyosys.so: $(filter-out kernel/driver.o,$(OBJS)) $(Q) mkdir -p $(dir $@) $(P) $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $< @@ -20,13 +20,15 @@ index aa66a54..2d4a1ff 100644 kernel/version_$(GIT_REV).cc: $(YOSYS_SRC)/Makefile $(P) rm -f kernel/version_*.o kernel/version_*.d kernel/version_*.cc - $(Q) mkdir -p kernel && echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"$(YOSYS_VER_STR)\"; }" > kernel/version_$(GIT_REV).cc +@@ -513,8 +512,10 @@ CXXFLAGS_NOVERIFIC = $(CXXFLAGS) + LDLIBS_NOVERIFIC = $(LDLIBS) + endif -+CXXFLAGS_FOR_YOSYS_CONFIG := $(shell echo $(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(CXXFLAGS)) | sed 's/-fdebug-prefix[^ ]\+ //' | sed 's/-ffile-prefix-map[^ ]\+ //') ++CXXFLAGS_FOR_YOSYS_CONFIG := $(shell echo $(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(CXXFLAGS_NOVERIFIC)) | sed 's/-fdebug-prefix[^ ]\+ //' | sed 's/-ffile-prefix-map[^ ]\+ //') + yosys-config: misc/yosys-config.in -- $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(CXXFLAGS))#;' \ +- $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(strip $(CXXFLAGS_NOVERIFIC)))#;' \ + $(P) $(SED) -e 's#@CXXFLAGS@#$(CXXFLAGS_FOR_YOSYS_CONFIG)#;' \ - -e 's#@CXX@#$(CXX)#;' -e 's#@LDFLAGS@#$(LDFLAGS)#;' -e 's#@LDLIBS@#$(LDLIBS)#;' \ - -e 's#@BINDIR@#$(BINDIR)#;' -e 's#@DATDIR@#$(DATDIR)#;' < $< > yosys-config + -e 's#@CXX@#$(strip $(CXX))#;' -e 's#@LDFLAGS@#$(strip $(LDFLAGS) $(PLUGIN_LDFLAGS))#;' -e 's#@LDLIBS@#$(strip $(LDLIBS_NOVERIFIC))#;' \ + -e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > yosys-config $(Q) chmod +x yosys-config diff --git a/debian/patches/01_gitrevision.patch b/debian/patches/01_gitrevision.patch index e34ce4a0..89515890 100644 --- a/debian/patches/01_gitrevision.patch +++ b/debian/patches/01_gitrevision.patch @@ -7,19 +7,21 @@ Subject: Compilation from the upstream code depends on being in the git Forwarded: doesn't make sense upstream --- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index 0a61fe6..27eb998 100644 +index 7698047..087ccb3 100644 --- a/Makefile +++ b/Makefile -@@ -73,7 +73,7 @@ else +@@ -99,8 +99,8 @@ LDFLAGS += -rdynamic + LDLIBS += -lrt endif - YOSYS_VER := 0.7 +-YOSYS_VER := 0.7+$(shell cd $(YOSYS_SRC) && test -e .git && { git log --author=clifford@clifford.at --oneline 61f6811.. | wc -l; }) -GIT_REV := $(shell cd $(YOSYS_SRC) && git rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) -+GIT_REV := 61f6811 ++YOSYS_VER := 0.7 ++GIT_REV := 0b7a184 OBJS = kernel/version_$(GIT_REV).o # set 'ABCREV = default' to use abc/ as it is diff --git a/debian/patches/02_removeabc.patch b/debian/patches/02_removeabc.patch index 370f640d..9a9f4dcc 100644 --- a/debian/patches/02_removeabc.patch +++ b/debian/patches/02_removeabc.patch @@ -9,15 +9,15 @@ Forwarded: doesn't make sense upstream 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 27eb998..f26a6e0 100644 +index 087ccb3..b021cd4 100644 --- a/Makefile +++ b/Makefile -@@ -225,7 +225,7 @@ endif - ifeq ($(ENABLE_ABC),1) - CXXFLAGS += -DYOSYS_ENABLE_ABC +@@ -344,7 +344,7 @@ LDLIBS += -lpthread + endif + else ifeq ($(ABCEXTERNAL),) -TARGETS += yosys-abc$(EXE) +#TARGETS += yosys-abc$(EXE) endif endif - + endif diff --git a/debian/patches/05_abc_executable.patch b/debian/patches/05_abc_executable.patch index c9bb08d2..b4a97529 100644 --- a/debian/patches/05_abc_executable.patch +++ b/debian/patches/05_abc_executable.patch @@ -11,12 +11,12 @@ Forwarded: doesn't make sense upstream 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc -index cc79296..b215cbc 100644 +index d2d15a4..adc9614 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc -@@ -1327,11 +1327,7 @@ struct AbcPass : public Pass { - log_header(design, "Executing ABC pass (technology mapping using ABC).\n"); - log_push(); +@@ -1432,11 +1432,7 @@ struct AbcPass : public Pass { + pi_map.clear(); + po_map.clear(); -#ifdef ABCEXTERNAL - std::string exe_file = ABCEXTERNAL; @@ -25,5 +25,5 @@ index cc79296..b215cbc 100644 -#endif + std::string exe_file = "berkeley-abc"; std::string script_file, liberty_file, constr_file, clk_str; - std::string delay_target, sop_inputs, sop_products; + std::string delay_target, sop_inputs, sop_products, lutin_shared = "-S 1"; bool fast_mode = false, dff_mode = false, keepff = false, cleanup = true; diff --git a/debian/patches/kfreebsd-support.patch b/debian/patches/kfreebsd-support.patch index 346ef18b..c9b9b3b1 100644 --- a/debian/patches/kfreebsd-support.patch +++ b/debian/patches/kfreebsd-support.patch @@ -7,104 +7,112 @@ Subject: Change yosys to look for the #define constant "__unix__" instead of and Clang 3.5 and GCC 4.9 on kFreeBSD. --- - kernel/driver.cc | 6 +++--- + kernel/driver.cc | 8 ++++---- kernel/log.cc | 6 +++--- kernel/log.h | 2 +- kernel/yosys.cc | 4 ++-- - libs/minisat/System.cc | 4 ++-- - libs/minisat/System.h | 2 +- + libs/minisat/System.cc | 2 +- passes/cmds/cover.cc | 2 +- - 7 files changed, 13 insertions(+), 13 deletions(-) + 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kernel/driver.cc b/kernel/driver.cc -index f8d00c3..45cd6ad 100644 +index 1786411..8b328e5 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc -@@ -30,7 +30,7 @@ +@@ -34,7 +34,7 @@ #include <limits.h> #include <errno.h> --#ifdef __linux__ -+#ifdef __unix__ +-#if defined (__linux__) || defined(__FreeBSD__) ++#if defined (__unix__) || defined(__FreeBSD__) + # include <sys/resource.h> # include <sys/types.h> # include <unistd.h> - #endif -@@ -409,7 +409,7 @@ int main(int argc, char **argv) +@@ -449,7 +449,7 @@ int main(int argc, char **argv) + if (print_stats) + log_hasher = new SHA1; + +-#if defined(__linux__) ++#if defined(__unix__) + // set stack size to >= 128 MB + { + struct rlimit rl; +@@ -532,7 +532,7 @@ int main(int argc, char **argv) #else std::string meminfo; std::string stats_divider = ", "; --# ifdef __linux__ -+# ifdef __unix__ +-# if defined(__linux__) ++# if defined(__unix__) std::ifstream statm; statm.open(stringf("/proc/%lld/statm", (long long)getpid())); if (statm.is_open()) { -@@ -463,7 +463,7 @@ int main(int argc, char **argv) +@@ -599,7 +599,7 @@ int main(int argc, char **argv) } } --#if defined(YOSYS_ENABLE_COVER) && defined(__linux__) -+#if defined(YOSYS_ENABLE_COVER) && defined(__unix__) +-#if defined(YOSYS_ENABLE_COVER) && (defined(__linux__) || defined(__FreeBSD__)) ++#if defined(YOSYS_ENABLE_COVER) && (defined(__unix__) || defined(__FreeBSD__)) if (getenv("YOSYS_COVER_DIR") || getenv("YOSYS_COVER_FILE")) { string filename; diff --git a/kernel/log.cc b/kernel/log.cc -index abc401f..9641e9d 100644 +index 0ee2170..1dfa89a 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -25,7 +25,7 @@ # include <sys/time.h> #endif --#ifdef __linux__ -+#ifdef __unix__ +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__unix__) || defined(__FreeBSD__) # include <dlfcn.h> #endif -@@ -280,7 +280,7 @@ void log_pop() +@@ -389,7 +389,7 @@ void log_pop() log_flush(); } --#if defined(__linux__) && defined(YOSYS_ENABLE_PLUGINS) -+#if defined(__unix__) && defined(YOSYS_ENABLE_PLUGINS) +-#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; -@@ -464,7 +464,7 @@ void log_cell(RTLIL::Cell *cell, std::string indent) +@@ -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__) -+#if defined(YOSYS_ENABLE_COVER) && defined(__unix__) +-#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; diff --git a/kernel/log.h b/kernel/log.h -index 53480db..4cf7d00 100644 +index 0b4905c..0f068a1 100644 --- a/kernel/log.h +++ b/kernel/log.h -@@ -106,7 +106,7 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi +@@ -119,7 +119,7 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi // This is the magic behind the code coverage counters // --------------------------------------------------- --#if defined(YOSYS_ENABLE_COVER) && defined(__linux__) -+#if defined(YOSYS_ENABLE_COVER) && defined(__unix__) +-#if defined(YOSYS_ENABLE_COVER) && (defined(__linux__) || defined(__FreeBSD__)) ++#if defined(YOSYS_ENABLE_COVER) && (defined(__unix__) || defined(__FreeBSD__)) #define cover(_id) do { \ static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1), used)) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \ diff --git a/kernel/yosys.cc b/kernel/yosys.cc -index 08fee97..8b071f0 100644 +index 264b1f6..91e9279 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc -@@ -66,7 +66,7 @@ std::vector<void*> memhasher_store; +@@ -77,7 +77,7 @@ std::vector<void*> memhasher_store; void memhasher_on() { --#ifdef __linux__ -+#ifdef __unix__ +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__unix__) || defined(__FreeBSD__) memhasher_rng += time(NULL) << 16 ^ getpid(); #endif memhasher_store.resize(0x10000); -@@ -647,7 +647,7 @@ struct TclPass : public Pass { +@@ -660,7 +660,7 @@ struct TclPass : public Pass { } TclPass; #endif @@ -114,10 +122,10 @@ index 08fee97..8b071f0 100644 { char path[PATH_MAX]; diff --git a/libs/minisat/System.cc b/libs/minisat/System.cc -index febe3b4..3df1810 100644 +index 1921a1d..efbfb08 100644 --- a/libs/minisat/System.cc +++ b/libs/minisat/System.cc -@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA +@@ -29,7 +29,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include "System.h" @@ -126,38 +134,16 @@ index febe3b4..3df1810 100644 #include <stdlib.h> -@@ -99,7 +99,7 @@ double Minisat::memUsedPeak(bool) { return 0; } - - void Minisat::setX86FPUPrecision() - { --#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW) -+#if defined(__unix__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) && defined(_FPU_GETCW) - // Only correct FPU precision on Linux architectures that needs and supports it: - fpu_control_t oldcw, newcw; - _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); -diff --git a/libs/minisat/System.h b/libs/minisat/System.h -index ee92a6e..8ad9902 100644 ---- a/libs/minisat/System.h -+++ b/libs/minisat/System.h -@@ -21,7 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA - #ifndef Minisat_System_h - #define Minisat_System_h - --#if defined(__linux__) -+#if defined(__unix__) - #include <fpu_control.h> - #endif - diff --git a/passes/cmds/cover.cc b/passes/cmds/cover.cc -index 1475475..1918b54 100644 +index 0ec7476..5f0042a 100644 --- a/passes/cmds/cover.cc +++ b/passes/cmds/cover.cc @@ -128,7 +128,7 @@ struct CoverPass : public Pass { log("\n"); } --#if defined(YOSYS_ENABLE_COVER) && defined(__linux__) -+#if defined(YOSYS_ENABLE_COVER) && defined(__unix__) +-#if defined(YOSYS_ENABLE_COVER) && (defined(__linux__) || defined(__FreeBSD__)) ++#if defined(YOSYS_ENABLE_COVER) && (defined(__unix__) || defined(__FreeBSD__)) for (auto &it : get_coverage_data()) { if (!patterns.empty()) { for (auto &p : patterns) |