From 7233ca6dc0cd2513dccfcc521ecb9d1676fcc0b7 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 3 Sep 2024 16:03:26 +0200 Subject: Fix Makefile by allowing cross compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since it was entirely developed on a real RISC-V board, I did not notice issues with cross compilation. Signed-off-by: Miquel Sabaté Solà --- arch/riscv/usr/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/riscv/usr/Makefile b/arch/riscv/usr/Makefile index 5f1ef3f..403fb14 100644 --- a/arch/riscv/usr/Makefile +++ b/arch/riscv/usr/Makefile @@ -1,7 +1,7 @@ -CC = $(CROSS_COMPILE)gcc -LD = $(CROSS_COMPILE)ld -CCFLAGS = -EXE = basics +CROSS_COMPILE ?= riscv64-suse-linux- +CC = $(CROSS_COMPILE)gcc +CCFLAGS = +EXE = basics DEBUG = ifneq ($(strip $(DEBUG)),) @@ -13,7 +13,7 @@ all: clean $(EXE) .PHONY: $(EXE) $(EXE): - gcc $(CCFLAGS) -o $(EXE) basics.c factorial.S string.S float.S + $(CC) $(CCFLAGS) -o $(EXE) basics.c factorial.S string.S float.S .PHONY: clean clean: -- cgit v1.2.3