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 912fdbc
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions freehdl/riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--- PKGBUILD
+++ PKGBUILD
@@ -29,14 +29,6 @@ sha256sums=('7f0978f8252329450de43e98c04c15fdd8a3f2bdc5ca91f75f8f5dd280c6ed84'

prepare() {
cd "${srcdir}"/$pkgname-$pkgver
- rm ieee/math_real.cc \
- ieee/numeric_bit.cc \
- ieee/numeric_std.cc \
- ieee/std_logic_1164.cc \
- ieee/std_logic_arith.cc \
- ieee/std_logic_signed.cc \
- ieee/std_logic_unsigned.cc \
- ieee/vital_timing.cc

#patch -p1 -i "$srcdir"/build-fix.patch
patch -p1 -i "$srcdir"/cpp-modern.patch
@@ -44,11 +36,16 @@ prepare() {
patch -p1 -i "$srcdir"/declarative_region.patch
patch -p1 -i "$srcdir"/gentoo-qa.patch
patch -p1 -i "$srcdir"/gvhdl_tag_command.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 register variable is not allowed in C++17, so use C++11 instead.
+ # The build type cannot be guessed by the configuration script, so specify one manually.
+ CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11" ./configure --prefix=/usr --build=$CARCH-unknown-linux-gnu
make
}

0 comments on commit 912fdbc

Please # to comment.