From d307eed25dcd56c38113c307816c1fdbfba77652 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Mon, 16 Jun 2025 09:51:34 +0100 Subject: [PATCH] bootrom: fix CC/OBJCOPY setting (#2984) In commit 92b2d0b ("fix fpga bootrom makefile") we should have tested $(CC) to be not cc if we where not to set the standard CC and OBJCOPY files. This should fix building the bootrom and allow overriding the CC/OBJCOPY when wanted. Signed-off-by: Ben Dooks Co-authored-by: JeanRochCoulon --- corev_apu/fpga/src/bootrom/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/corev_apu/fpga/src/bootrom/Makefile b/corev_apu/fpga/src/bootrom/Makefile index b8a980945..f9e9fc3e2 100644 --- a/corev_apu/fpga/src/bootrom/Makefile +++ b/corev_apu/fpga/src/bootrom/Makefile @@ -17,8 +17,10 @@ UART_BITRATE ?= 115200 HAS_ETHERNET ?= 1 endif -CC ?= $(RISCV)/bin/${CROSSCOMPILE}gcc -OBJCOPY ?= $(RISCV)/bin/$(CROSSCOMPILE)objcopy +ifeq ($(CC),cc) + CC = $(RISCV)/bin/${CROSSCOMPILE}gcc + OBJCOPY = $(RISCV)/bin/$(CROSSCOMPILE)objcopy +endif SED = sed PLATFORM_DEFINES = -DCLOCK_FREQUENCY=$(CLOCK_FREQUENCY) -DUART_BITRATE=$(UART_BITRATE) -D$(PLATFORM)