Skip to content

Commit

Permalink
Merge pull request #130 from hdl/fix-yosys-uhdm
Browse files Browse the repository at this point in the history
yosys-uhdm: update yosys patches
  • Loading branch information
ajelinski committed Sep 13, 2021
2 parents 50bdd98 + 0d69a32 commit 7ac0bfb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
40 changes: 31 additions & 9 deletions syn/yosys-uhdm/uhdm-plugin.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/yosys-symbiflow-plugins/Makefile_plugin.common b/yosys-symbiflow-plugins/Makefile_plugin.common
index 053a79f..5c52b36 100644
index 5e0a244..d06d555 100644
--- a/yosys-symbiflow-plugins/Makefile_plugin.common
+++ b/yosys-symbiflow-plugins/Makefile_plugin.common
@@ -36,12 +36,12 @@
@@ -37,12 +37,12 @@
# | | |-- ...
# |-- example2-plugin
# |-- ...
-CXX = $(shell yosys-config --cxx)
-CXXFLAGS = $(shell yosys-config --cxxflags) #-DSDC_DEBUG
-LDFLAGS = $(shell yosys-config --ldflags)
-LDLIBS = $(shell yosys-config --ldlibs)
-PLUGINS_DIR = $(shell yosys-config --datdir)/plugins
-DATA_DIR = $(shell yosys-config --datdir)
-CXX ?= $(shell yosys-config --cxx)
-CXXFLAGS ?= $(shell yosys-config --cxxflags) #-DSDC_DEBUG
-LDFLAGS ?= $(shell yosys-config --ldflags)
-LDLIBS ?= $(shell yosys-config --ldlibs)
-PLUGINS_DIR ?= $(shell yosys-config --datdir)/plugins
-DATA_DIR ?= $(shell yosys-config --datdir)
+CXX = $(shell uhdm-yosys-config --cxx)
+CXXFLAGS = $(shell uhdm-yosys-config --cxxflags) #-DSDC_DEBUG
+LDFLAGS = $(shell uhdm-yosys-config --ldflags)
Expand All @@ -21,4 +21,26 @@ index 053a79f..5c52b36 100644

OBJS := $(SOURCES:cc=o)


diff --git a/yosys-symbiflow-plugins/Makefile_test.common b/yosys-symbiflow-plugins/Makefile_test.common
index d1c8789..3ca7481 100644
--- a/yosys-symbiflow-plugins/Makefile_test.common
+++ b/yosys-symbiflow-plugins/Makefile_test.common
@@ -13,12 +13,12 @@
# test1_verify = $(call diff_test,test1,ext) && test $$(grep "PASS" test1/test1.txt | wc -l) -eq 2
# test2_verify = $(call diff_test,test2,ext)
#
-GTEST_DIR ?= ../../third_party/googletest/googletest
-CXX ?= $(shell yosys-config --cxx)
-CXXFLAGS ?= $(shell yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include
-LDLIBS ?= $(shell yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread
-LDFLAGS ?= $(shell yosys-config --ldflags)
-TEST_UTILS ?= ../../../test-utils/test-utils.tcl
+GTEST_DIR = ../../third_party/googletest/googletest
+CXX = $(shell uhdm-yosys-config --cxx)
+CXXFLAGS = $(shell uhdm-yosys-config --cxxflags) -I.. -I$(GTEST_DIR)/include
+LDLIBS = $(shell uhdm-yosys-config --ldlibs) -L$(GTEST_DIR)/build/lib -lgtest -lgtest_main -lpthread
+LDFLAGS = $(shell uhdm-yosys-config --ldflags)
+TEST_UTILS = ../../../test-utils/test-utils.tcl

define test_tpl =
$(1): $(1)/ok
12 changes: 6 additions & 6 deletions syn/yosys-uhdm/yosys.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/yosys/Makefile b/yosys/Makefile
index 72ca15e36..85f131096 100644
index 8275d8336..2176b149f 100644
--- a/yosys/Makefile
+++ b/yosys/Makefile
@@ -342,6 +342,19 @@ LDLIBS := $(filter-out -lrt,$(LDLIBS))
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DWIN32_NO_DLL -DHAVE_STRUCT_TIMESPEC -fpermissive -w"
@@ -346,6 +346,20 @@ ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DWIN32_NO_DLL -DHAVE_STRUCT_TIMESPEC
ABCMKARGS += LIBS="-lpthread -s" ABC_USE_NO_READLINE=0 CC="x86_64-w64-mingw32-gcc" CXX="$(CXX)"
EXE = .exe

+else ifeq ($(CONFIG),conda-linux)
+CXX = x86_64-conda_cos6-linux-gnu-gcc
+LD = x86_64-conda_cos6-linux-gnu-gcc
Expand All @@ -19,7 +19,7 @@ index 72ca15e36..85f131096 100644
+LD = x86_64-apple-darwin13.4.0-clang++
+CXXFLAGS += -std=c++11 -Os
+ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
+
else ifneq ($(CONFIG),none)
$(error Invalid CONFIG setting '$(CONFIG)'. Valid values: clang, gcc, gcc-4.8, emcc, mxe, msys2, msys2-64)

$(error Invalid CONFIG setting '$(CONFIG)'. Valid values: clang, gcc, gcc-4.8, emcc, mxe, msys2-32, msys2-64)
endif

0 comments on commit 7ac0bfb

Please sign in to comment.