Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame^] | 1 | From 66dfe0fa886f6289add06d1af8642ce2b5302852 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 9 Feb 2021 16:40:12 -0800 |
| 4 | Subject: [PATCH] riscv32: Use double-float ABI for rv32 |
| 5 | |
| 6 | So it can use libgcc built with OE toolchain |
| 7 | Fixes |
| 8 | error: "can't link hard-float modules with soft-float modules" |
| 9 | |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | Upstream-Status: Inappropriate [embedded specific] |
| 12 | --- |
| 13 | arch/riscv/Makefile | 6 ++++-- |
| 14 | 1 file changed, 4 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile |
| 17 | index 0b80eb8d86..7324946f48 100644 |
| 18 | --- a/arch/riscv/Makefile |
| 19 | +++ b/arch/riscv/Makefile |
| 20 | @@ -9,7 +9,9 @@ ifeq ($(CONFIG_ARCH_RV64I),y) |
| 21 | endif |
| 22 | ifeq ($(CONFIG_ARCH_RV32I),y) |
| 23 | ARCH_BASE = rv32im |
| 24 | - ABI = ilp32 |
| 25 | + ABI = ilp32d |
| 26 | + ARCH_D = d |
| 27 | + ARCH_F = f |
| 28 | endif |
| 29 | ifeq ($(CONFIG_RISCV_ISA_A),y) |
| 30 | ARCH_A = a |
| 31 | @@ -24,7 +26,7 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y) |
| 32 | CMODEL = medany |
| 33 | endif |
| 34 | |
| 35 | -ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) \ |
| 36 | +ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_F)$(ARCH_D)$(ARCH_C) -mabi=$(ABI) \ |
| 37 | -mcmodel=$(CMODEL) |
| 38 | |
| 39 | PLATFORM_CPPFLAGS += $(ARCH_FLAGS) |
| 40 | -- |
| 41 | 2.30.0 |
| 42 | |