From 912fdbcebed30fb0916287092d5730b947c1aeaa Mon Sep 17 00:00:00 2001 From: Kino Date: Sat, 18 Jan 2025 02:18:52 +0800 Subject: [PATCH] addpatch: freehdl --- freehdl/riscv64.patch | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 freehdl/riscv64.patch diff --git a/freehdl/riscv64.patch b/freehdl/riscv64.patch new file mode 100644 index 000000000..95526b006 --- /dev/null +++ b/freehdl/riscv64.patch @@ -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 + } +