In context of cross compiling, $(CC) refers to compiler to generate
target binary, we can't assume $(CC) is capable to generate host binary.
Set default HOSTCC to cc, and make override of CC unconditional.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Makefile | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 01f42ec334591be5c6ed58c6bbe478de01f4b26d..1e03a0e5af9a974b0c8c0c8c95269b7635737315 100644
--- a/Makefile
+++ b/Makefile
@@ -8,15 +8,14 @@
OUT=out/
# Common command definitions
-export HOSTCC := $(CC)
+export HOSTCC := cc
export CONFIG_SHELL := sh
export KCONFIG_AUTOHEADER := autoconf.h
export KCONFIG_CONFIG := $(CURDIR)/.config
export LC_ALL := C
-CROSS_PREFIX=
-ifneq ($(CROSS_PREFIX),)
+
+CROSS_PREFIX :=
CC=$(CROSS_PREFIX)gcc
-endif
AS=$(CROSS_PREFIX)as
LD=$(CROSS_PREFIX)ld
OBJCOPY=$(CROSS_PREFIX)objcopy
--
2.43.0
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org