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 <ben.dooks@codethink.co.uk>
Co-authored-by: JeanRochCoulon <jean-roch.coulon@thalesgroup.com>
This commit is contained in:
Ben Dooks 2025-06-16 09:51:34 +01:00 committed by GitHub
parent 9ab2df9112
commit d307eed25d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)