From 4413af583b2bff5e9da46ef7cbf168bfa1c9947e Mon Sep 17 00:00:00 2001
From: Mark Poliakov <mark@alnyan.me>
Date: Wed, 26 Feb 2025 18:14:08 +0200
Subject: [PATCH 3/4] alnyan/yggdrasil: fix riscv64 build

---
 Make.inc | 1 +
 Makefile | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Make.inc b/Make.inc
index ad38fab..48efddf 100644
--- a/Make.inc
+++ b/Make.inc
@@ -92,6 +92,7 @@ override ARCH := mips
 endif
 ifeq ($(findstring riscv64,$(ARCH)),riscv64)
 override ARCH := riscv64
+MARCH ?= rv64gc
 endif
 ifeq ($(findstring loongarch64,$(ARCH)),loongarch64)
 override ARCH := loongarch64
diff --git a/Makefile b/Makefile
index 17e03a0..b096cf3 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ ifeq ($(LONG_DOUBLE_NOT_DOUBLE),1)
 ifneq ($(filter $(ARCH),i387 amd64),)
 SUBDIRS += ld80
 else
-ifneq ($(filter $(ARCH),aarch64),)
+ifneq ($(filter $(ARCH),aarch64 riscv64),)
 SUBDIRS += ld128
 else
 endif
-- 
2.48.1

