Skip to content

Commit d307eed

Browse files
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>
1 parent 9ab2df9 commit d307eed

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

corev_apu/fpga/src/bootrom/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ UART_BITRATE ?= 115200
1717
HAS_ETHERNET ?= 1
1818
endif
1919

20-
CC ?= $(RISCV)/bin/${CROSSCOMPILE}gcc
21-
OBJCOPY ?= $(RISCV)/bin/$(CROSSCOMPILE)objcopy
20+
ifeq ($(CC),cc)
21+
CC = $(RISCV)/bin/${CROSSCOMPILE}gcc
22+
OBJCOPY = $(RISCV)/bin/$(CROSSCOMPILE)objcopy
23+
endif
2224
SED = sed
2325
PLATFORM_DEFINES = -DCLOCK_FREQUENCY=$(CLOCK_FREQUENCY) -DUART_BITRATE=$(UART_BITRATE) -D$(PLATFORM)
2426

0 commit comments

Comments
 (0)