]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Respect value of $(CC) variable cc 875/head
authorDavid Yeske <dyeske@gmail.com>
Thu, 2 Feb 2023 16:30:29 +0000 (16:30 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 2 Feb 2023 16:30:29 +0000 (16:30 +0000)
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>
src/Makefile

index bc82cc6fe082956a8e25ca1554d719f36542fd26..b37e2411b0dd92e04863aa1d4c15608ee753e03f 100644 (file)
@@ -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