Skip to content

Commit

Permalink
addpatch: freehdl
Browse files Browse the repository at this point in the history
  • Loading branch information
cybaol committed Jan 18, 2025
1 parent 9acbd4a commit 8150a60
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
21 changes: 21 additions & 0 deletions freehdl/fix-core-dump.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -Naur freehdl-0.0.8_0/v2cc/v2cc-explore.cc freehdl-0.0.8_1/v2cc/v2cc-explore.cc
--- freehdl-0.0.8_0/v2cc/v2cc-explore.cc 2010-04-13 02:40:40.000000000 +0800
+++ freehdl-0.0.8_1/v2cc/v2cc-explore.cc 2025-01-18 22:59:49.198191595 +0800
@@ -1633,6 +1633,7 @@
choice_descriptor &operator=(const choice_descriptor &src) {
choice_node = src.choice_node;
choice_value = src.choice_value;
+ return *this;
}
};

diff -Naur freehdl-0.0.8_0/v2cc/v2cc-impl.cc freehdl-0.0.8_1/v2cc/v2cc-impl.cc
--- freehdl-0.0.8_0/v2cc/v2cc-impl.cc 2010-05-08 20:16:33.000000000 +0800
+++ freehdl-0.0.8_1/v2cc/v2cc-impl.cc 2025-01-18 23:05:49.575378359 +0800
@@ -1031,6 +1031,8 @@
for (pIIR_ElementDeclarationList edl = rt->element_declarations;
edl; edl = edl->rest)
str += ".set(" + to_string(i++) + "," + get_type_info_obj(edl->first->subtype, rstack, static_info) + ")";
+
+ return IR_LOCALLY_STATIC;
}
29 changes: 29 additions & 0 deletions freehdl/riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- PKGBUILD
+++ PKGBUILD
@@ -44,11 +44,18 @@ prepare() {
patch -p1 -i "$srcdir"/declarative_region.patch
patch -p1 -i "$srcdir"/gentoo-qa.patch
patch -p1 -i "$srcdir"/gvhdl_tag_command.patch
+ patch -p1 -i "$srcdir"/fix-core-dump.patch
+
+ # The size is a member variable, not a member function.
+ sed -i 's|ainfo->element_type->size()|ainfo->element_type->size|g' freehdl/std-vhdl-types.hh
}

build() {
cd "${srcdir}"/$pkgname-$pkgver
- CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" ./configure --prefix=/usr
+ # The configure is outdated, regenerate it.
+ autoreconf -fiv
+ # The register variable is not allowed in C++17, so use C++11 instead.
+ CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11" ./configure --prefix=/usr
make
}

@@ -56,3 +63,6 @@ package() {
cd "${srcdir}"/$pkgname-$pkgver
make DESTDIR="${pkgdir}" install
}
+
+source+=('fix-core-dump.patch')
+sha256sums+=('c8061f1340373d09fb3c4df8c4ce9d5c20685b88ab585266ecbf798277e7a9ee')

0 comments on commit 8150a60

Please sign in to comment.