Skip to content
Snippets Groups Projects
Commit defae224 authored by Marian Buschsieweke's avatar Marian Buschsieweke Committed by Sören Tempel
Browse files

testing/yosys: upgrade to 0.42

https://github.com/YosysHQ/yosys/releases/tag/yosys-0.42

Note: This failed to link with clang/LLVM, but worked out of the box
      with GCC. So, I just changed the toolchain to GCC.
Also note: The unit test segfaulted with LTO. Hence, LTO was disabled.
parent c2218df0
No related branches found
No related tags found
1 merge request!67495testing/yosys: upgrade to 0.42
Pipeline #242281 skipped
# Contributor: Dominika Liberda <ja@sdomi.pl>
# Maintainer: Dominika Liberda <ja@sdomi.pl>
pkgname=yosys
pkgver=0.36
pkgrel=3
pkgver=0.42
pkgrel=0
pkgdesc="Yosys Open SYnthesis Suite"
url="https://yosyshq.net"
# doesn't build
......@@ -15,7 +15,6 @@ makedepends="
bash
bison
boost-dev
clang
flex
gawk
graphviz-dev
......@@ -27,21 +26,22 @@ makedepends="
tcl-dev
zlib-dev
"
checkdepends="
iverilog
"
subpackages="$pkgname-dev py3-$pkgname:py3:noarch"
source="https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-$pkgver.tar.gz
source="
https://github.com/YosysHQ/yosys/archive/refs/tags/yosys-$pkgver.tar.gz
"
builddir="$srcdir/$pkgname-$pkgname-$pkgver/"
options="!check" # current yosys employee confirmed those dont work
build() {
export CFLAGS="$CFLAGS -flto=thin"
export CXXFLAGS="$CXXFLAGS -flto=thin"
export LDFLAGS="$LDFLAGS -fuse-ld=lld"
prepare() {
default_prepare
local pyver="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
cat > Makefile.conf <<- EOF
CONFIG:=clang
CONFIG:=gcc
PREFIX:=/usr
ABCEXTERNAL:=abc
BOOST_PYTHON_LIB:=-lpython$pyver -lboost_python${pyver/./}
......@@ -51,12 +51,27 @@ build() {
ENABLE_PYOSYS:=1
ENABLE_ABC:=1
EOF
}
build() {
# Not using LTO, as test segfault with LTO enabled. Not unique to Alpine:
# https://gitlab.archlinux.org/archlinux/packaging/packages/yosys/-/blob/main/PKGBUILD?ref_type=heads#L20
make CXX=g++
}
make
check() {
case "$CARCH" in
arm*|x86)
# remove tests failing on 32-bit platforms:
rm -f tests/simple/string_format.v
sed -i Makefile -e '/tests\/cxxrtl/d'
;;
esac
make CXX=g++ test
}
package() {
make DESTDIR="$pkgdir" install
make CXX=g++ DESTDIR="$pkgdir" install
# link python to the global yosys
ln -sfv /usr/lib/yosys/libyosys.so "$pkgdir"/usr/lib/python3*/site-packages/pyosys/libyosys.so
......@@ -70,5 +85,5 @@ py3() {
}
sha512sums="
3d496ab7efba75b6a8e3ded30d62214e868c52b7f0609f214ea4a336dcb9e38343fc3ae0ddea18c026028989d4caee06efa3822210d8e88e159a3fca28fcae4e yosys-0.36.tar.gz
2f85beeaf672a3cfd9dc0841d08265a518270e9929ac84cfd346330b460dfbdeec89f7c78b68d9dfbb598175c0beaee9f9c47bc04aaf8fdb719822fd5bd11dd2 yosys-0.42.tar.gz
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment