aboutsummaryrefslogtreecommitdiffstats
path: root/yosys.diff
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-02-02 21:34:40 +0100
committerTristan Gingold <tgingold@free.fr>2017-02-02 21:34:40 +0100
commitfa2166d5bbf07ffc764b2e562f1eaf8ae3b4f1b6 (patch)
tree8aceadd91c375e3c8f8a510a6c0ac685d36c3f88 /yosys.diff
parentabedb1d0d808687e44a4947afae4016c1c057693 (diff)
downloadghdl-yosys-plugin-fa2166d5bbf07ffc764b2e562f1eaf8ae3b4f1b6.tar.gz
ghdl-yosys-plugin-fa2166d5bbf07ffc764b2e562f1eaf8ae3b4f1b6.tar.bz2
ghdl-yosys-plugin-fa2166d5bbf07ffc764b2e562f1eaf8ae3b4f1b6.zip
Add sources for yosys.
Diffstat (limited to 'yosys.diff')
-rw-r--r--yosys.diff45
1 files changed, 45 insertions, 0 deletions
diff --git a/yosys.diff b/yosys.diff
new file mode 100644
index 0000000..942ddca
--- /dev/null
+++ b/yosys.diff
@@ -0,0 +1,45 @@
+diff --git a/Makefile b/Makefile
+index aba7775..9836831 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,6 +14,7 @@ ENABLE_READLINE := 1
+ ENABLE_VERIFIC := 0
+ ENABLE_COVER := 1
+ ENABLE_LIBYOSYS := 0
++ENABLE_GHDL := 0
+
+ # other configuration flags
+ ENABLE_GPROF := 0
+@@ -49,7 +50,7 @@ all: top-all
+ YOSYS_SRC := $(dir $(firstword $(MAKEFILE_LIST)))
+ VPATH := $(YOSYS_SRC)
+
+-CXXFLAGS += -Wall -Wextra -ggdb -I. -I"$(YOSYS_SRC)" -MD -D_YOSYS_ -fPIC -I$(PREFIX)/include
++CXXFLAGS += -Wall -Wextra -g -I. -I"$(YOSYS_SRC)" -MD -D_YOSYS_ -I$(PREFIX)/include
+ LDFLAGS += -L$(LIBDIR)
+ LDLIBS = -lstdc++ -lm
+
+@@ -104,7 +105,7 @@ endif
+ ifeq ($(CONFIG),clang)
+ CXX = clang
+ LD = clang++
+-CXXFLAGS += -std=c++11 -Os
++CXXFLAGS += -std=c++11 # -Os
+
+ ifneq ($(SANITIZER),)
+ $(info [Clang Sanitizer] $(SANITIZER))
+@@ -236,6 +237,14 @@ CXXFLAGS += $(patsubst %,-I$(VERIFIC_DIR)/%,$(VERIFIC_COMPONENTS)) -DYOSYS_ENABL
+ LDLIBS += $(patsubst %,$(VERIFIC_DIR)/%/*-linux.a,$(VERIFIC_COMPONENTS))
+ endif
+
++ifeq ($(ENABLE_GHDL),1)
++GHDL_DIR ?= /usr/local/ghdl
++GHDL_INCLUDE_DIR ?= $(GHDL_DIR)/include
++GHDL_LIB_DIR ?= $(GHDL_DIR)/lib
++CXXFLAGS += -I$(GHDL_INCLUDE_DIR) -DYOSYS_ENABLE_GHDL
++LDLIBS += $(GHDL_LIB_DIR)/libghdlsynth.a $(shell cat $(GHDL_LIB_DIR)/ghdlsynth.link)
++endif
++
+ ifeq ($(ENABLE_COVER),1)
+ CXXFLAGS += -DYOSYS_ENABLE_COVER
+ endif