Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpatch: freehdl #4454

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')
Loading