Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit b576fd1

Browse files
authored
Merge pull request #71 from umarcor/fix/ghdl-prefix
yosys: patch was upstreamed, GHDL_DIR is now GHDL_PREFIX
2 parents becd6aa + 54e8428 commit b576fd1

File tree

2 files changed

+6
-29
lines changed

2 files changed

+6
-29
lines changed

scripts/compile_yosys.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ then
3030
mkdir -p frontends/ghdl
3131
cp -R ../$dir_name_gyp/src/* frontends/ghdl
3232
MAKEFILE_CONF_GHDL=$'ENABLE_GHDL := 1\n'
33-
MAKEFILE_CONF_GHDL+="GHDL_DIR := $PACKAGE_DIR/$NAME"
33+
MAKEFILE_CONF_GHDL+="GHDL_PREFIX := $PACKAGE_DIR/$NAME"
3434

3535
if [ $ARCH == "darwin" ]; then
3636
GHDL_LDLIBS="$PACKAGE_DIR/$NAME/lib/libghdl.a $(tr -s '\n' ' ' < $PACKAGE_DIR/$NAME/lib/libghdl.link)"

scripts/yosys_ghdl.diff

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,30 @@ diff --git a/Makefile b/Makefile
22
index 45213c6f..f8393ea4 100644
33
--- a/Makefile
44
+++ b/Makefile
5-
@@ -21,6 +21,7 @@ ENABLE_COVER := 1
6-
ENABLE_LIBYOSYS := 0
7-
ENABLE_PROTOBUF := 0
8-
ENABLE_ZLIB := 1
9-
+ENABLE_GHDL := 0
10-
11-
# python wrappers
12-
ENABLE_PYOSYS := 0
135
@@ -82,7 +83,7 @@ all: top-all
146
YOSYS_SRC := $(dir $(firstword $(MAKEFILE_LIST)))
157
VPATH := $(YOSYS_SRC)
16-
8+
179
-CXXFLAGS := $(CXXFLAGS) -Wall -Wextra -ggdb -I. -I"$(YOSYS_SRC)" -MD -MP -D_YOSYS_ -fPIC -I$(PREFIX)/include
1810
+CXXFLAGS := $(CXXFLAGS) -w -I. -I"$(YOSYS_SRC)" -MD -MP -D_YOSYS_ -I$(PREFIX)/include
1911
LDLIBS := $(LDLIBS) -lstdc++ -lm
2012
PLUGIN_LDFLAGS :=
21-
13+
2214
@@ -119,7 +120,7 @@ export PATH := $(PORT_PREFIX)/bin:$(PATH)
2315
endif
24-
16+
2517
else
2618
-LDFLAGS += -rdynamic
2719
+LDFLAGS +=
2820
LDLIBS += -lrt
2921
endif
30-
22+
3123
@@ -184,7 +185,7 @@ endif
3224
ifeq ($(CONFIG),clang)
3325
CXX = clang
3426
LD = clang++
3527
-CXXFLAGS += -std=c++11 -Os
3628
+CXXFLAGS += -std=c++11
3729
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
38-
30+
3931
ifneq ($(SANITIZER),)
40-
@@ -510,6 +511,14 @@ endif
41-
endif
42-
endif
43-
44-
+ifeq ($(ENABLE_GHDL),1)
45-
+GHDL_DIR ?= /usr/local/ghdl
46-
+GHDL_INCLUDE_DIR ?= $(GHDL_DIR)/include
47-
+GHDL_LIB_DIR ?= $(GHDL_DIR)/lib
48-
+CXXFLAGS += -I$(GHDL_INCLUDE_DIR) -DYOSYS_ENABLE_GHDL
49-
+LDLIBS += $(GHDL_LIB_DIR)/libghdl.a $(shell cat $(GHDL_LIB_DIR)/ghdl.link)
50-
+endif
51-
+
52-
ifeq ($(ENABLE_VERIFIC),1)
53-
VERIFIC_DIR ?= /usr/local/src/verific_lib
54-
VERIFIC_COMPONENTS ?= verilog vhdl database util containers hier_tree

0 commit comments

Comments
 (0)