aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Yeske <dyeske@gmail.com>2023-02-02 16:30:29 +0000
committerMichael Brown <mcb30@ipxe.org>2023-02-02 16:30:29 +0000
commit179e51dfc404fcb0bb6027ae51574ca867236d72 (patch)
tree8a6fb9e40549ec9892c6f8b6cf98c92399c75ae3
parent8b645eea16fbbc6976f4d34b8e0db94ccbd0e61e (diff)
downloadipxe-cc.tar.gz
[build] Respect value of $(CC) variablecc
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>
-rw-r--r--src/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile
index bc82cc6fe..b37e2411b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -16,7 +16,8 @@ SYMBOL_PREFIX :=
#
# Locations of tools
#
-HOST_CC := gcc
+CC ?= gcc
+HOST_CC := $(CC)
RM := rm -f
TOUCH := touch
MKDIR := mkdir
@@ -26,7 +27,7 @@ PRINTF := printf
PERL := perl
PYTHON := python
TRUE := true
-CC := $(CROSS_COMPILE)gcc
+CC := $(CROSS_COMPILE)$(CC)
CPP := $(CC) -E
AS := $(CROSS_COMPILE)as
LD := $(CROSS_COMPILE)ld