From 2db1dbf41ac10f99d2468a54e9f5ea678cc87190 Mon Sep 17 00:00:00 2001 From: Steve Kelly Date: Sun, 15 Aug 2021 11:37:55 -0400 Subject: [PATCH 1/3] [yosys] enable libyoys, and several cleanups - enable libyosys - correct version to match upstream - whitespace fixes - fix Product array --- Y/Yosys/build_tarballs.jl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Y/Yosys/build_tarballs.jl b/Y/Yosys/build_tarballs.jl index 16bffe1a542..12ee4dc4f55 100644 --- a/Y/Yosys/build_tarballs.jl +++ b/Y/Yosys/build_tarballs.jl @@ -3,7 +3,7 @@ using BinaryBuilder, Pkg name = "Yosys" -version = v"0.1.0" +version = v"0.9.0" # Collection of sources required to complete build sources = [ @@ -14,8 +14,8 @@ dependencies = [ Dependency("boost_jll"; compat="=1.76.0"), # max gcc7 Dependency("Readline_jll"), Dependency("Tcl_jll"), - Dependency("Zlib_jll"; compat="~1.2.11"), - Dependency("Libffi_jll"; compat="~3.2.2"), + Dependency("Zlib_jll"; compat="1.2.12"), + Dependency("Libffi_jll"; compat="3.2.2"), ] # Bash recipe for building across all platforms @@ -26,8 +26,8 @@ if [[ "${target}" == *-apple-* ]] || [[ "${target}" == *-freebsd* ]]; then else CONFIG=gcc fi -make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc} -make install PREFIX=${prefix} +make ENABLE_LIBYOSYS=1 CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc} +make install PREFIX=${prefix} ENABLE_LIBYOSYS=1 """ # These are the platforms we will build for by default, unless further @@ -39,11 +39,12 @@ filter!(x -> cxxstring_abi(x) != "cxx03", platforms) # The products that we will ensure are always built products = Product[ - ExecutableProduct("yosys", :yosys) - ExecutableProduct("yosys-config", :yosys_config) - ExecutableProduct("yosys-filterlib", :yosys_filterlib) - ExecutableProduct("yosys-smtbmc", :yosys_smtbmc) - ExecutableProduct("yosys-abc", :yosys_abc) + ExecutableProduct("yosys", :yosys), + ExecutableProduct("yosys-config", :yosys_config), + ExecutableProduct("yosys-filterlib", :yosys_filterlib), + ExecutableProduct("yosys-smtbmc", :yosys_smtbmc), + ExecutableProduct("yosys-abc", :yosys_abc), + LibraryProduct("libyosys", :libyosys, ["lib/yosys"]) ] # Build the tarballs, and possibly a `build.jl` as well. From 8555bbce3dcf7ee8676dfcd9677ccc19243bb9ed Mon Sep 17 00:00:00 2001 From: Steve Kelly Date: Sun, 15 Aug 2021 13:02:19 -0400 Subject: [PATCH 2/3] [yosys] fix libyosys build on apple --- Y/Yosys/build_tarballs.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Y/Yosys/build_tarballs.jl b/Y/Yosys/build_tarballs.jl index 12ee4dc4f55..9ffcbb37d8a 100644 --- a/Y/Yosys/build_tarballs.jl +++ b/Y/Yosys/build_tarballs.jl @@ -23,11 +23,16 @@ script = raw""" cd yosys if [[ "${target}" == *-apple-* ]] || [[ "${target}" == *-freebsd* ]]; then CONFIG=clang + OS=Darwin else CONFIG=gcc + OS=Linux +fi +make ENABLE_LIBYOSYS=1 OS=${OS} CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc} +make install OS=${OS} PREFIX=${prefix} ENABLE_LIBYOSYS=1 +if [[ "${target}" == *-apple-* ]]; then + mv ${prefix}/lib/yosys/libyosys.so ${prefix}/lib/yosys/libyosys.dylib fi -make ENABLE_LIBYOSYS=1 CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc} -make install PREFIX=${prefix} ENABLE_LIBYOSYS=1 """ # These are the platforms we will build for by default, unless further From 4fc684eff03752e1c26afd3b48ba136513b13642 Mon Sep 17 00:00:00 2001 From: Steve Kelly Date: Sun, 15 Aug 2021 16:38:43 -0400 Subject: [PATCH 3/3] Update Y/Yosys/build_tarballs.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mosè Giordano --- Y/Yosys/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Y/Yosys/build_tarballs.jl b/Y/Yosys/build_tarballs.jl index 9ffcbb37d8a..1cd12c59da1 100644 --- a/Y/Yosys/build_tarballs.jl +++ b/Y/Yosys/build_tarballs.jl @@ -15,7 +15,7 @@ dependencies = [ Dependency("Readline_jll"), Dependency("Tcl_jll"), Dependency("Zlib_jll"; compat="1.2.12"), - Dependency("Libffi_jll"; compat="3.2.2"), + Dependency("Libffi_jll"; compat="~3.2.2"), ] # Bash recipe for building across all platforms