[build] Respect value of $(CC) variable

On FreeBSD the gcc package installs a versioned binary such as
"gcc12".  There is no plain "gcc" binary.

Simplify building on such systems by respecting the $(CC) variable.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
David Yeske 2023-02-02 16:30:29 +00:00 committed by Michael Brown
parent 8b645eea16
commit 179e51dfc4

View File

@ -16,7 +16,8 @@ SYMBOL_PREFIX :=
# #
# Locations of tools # Locations of tools
# #
HOST_CC := gcc CC ?= gcc
HOST_CC := $(CC)
RM := rm -f RM := rm -f
TOUCH := touch TOUCH := touch
MKDIR := mkdir MKDIR := mkdir
@ -26,7 +27,7 @@ PRINTF := printf
PERL := perl PERL := perl
PYTHON := python PYTHON := python
TRUE := true TRUE := true
CC := $(CROSS_COMPILE)gcc CC := $(CROSS_COMPILE)$(CC)
CPP := $(CC) -E CPP := $(CC) -E
AS := $(CROSS_COMPILE)as AS := $(CROSS_COMPILE)as
LD := $(CROSS_COMPILE)ld LD := $(CROSS_COMPILE)ld