From 1f9701e26c1afe17e1ce96166d80adb591ba9953 Mon Sep 17 00:00:00 2001
From: Andrey Turkin <andrey.turkin@gmail.com>
Date: Thu, 31 Oct 2024 10:26:26 +0300
Subject: [PATCH] Override RISC-V CFLAGS in cargo.toml

Makes RISC-V builds work without cc-rs patch, as apparently
CFLAGS take precedence over cc-rs' heuristics
---
 .cargo/config.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.cargo/config.toml b/.cargo/config.toml
index e7c5a8e60..1c0e5fab7 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -13,3 +13,6 @@ rustflags = []
 [target.riscv64gc-unknown-redox]
 linker = "riscv64-unknown-redox-gcc"
 rustflags = []
+
+[env]
+CFLAGS_riscv64gc_unknown_redox="-march=rv64gc -mabi=lp64d"
-- 
GitLab