Allow all host flags to be set at top level makefile. Allow KBUILD_DEFCONFIG to be specified to load external defconfigs. Allow linux style CROSS_COMPILE specifier.
Signed-off-by: Jiaxun Yang <jiaxun.y...@flygoat.com> --- Makefile | 6 +++++- scripts/kconfig/Makefile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f2f4ebc5b69be1d4b9ecfc99b63f09ecaecd9474..b5660928c2056970e3174be368e65752a948f16a 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,16 @@ OUT=out/ # Common command definitions export HOSTCC := cc +export HOSTCFLAGS := +export HOSTLDFLAGS := export CONFIG_SHELL := sh export KCONFIG_AUTOHEADER := autoconf.h export KCONFIG_CONFIG := $(CURDIR)/.config +export KBUILD_DEFCONFIG := /dev/null export LC_ALL := C -CROSS_PREFIX := +CROSS_COMPILE := +CROSS_PREFIX := $(CROSS_COMPILE) CC=$(CROSS_PREFIX)gcc LD=$(CROSS_PREFIX)ld OBJCOPY=$(CROSS_PREFIX)objcopy diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 1c1293618764c891f04d55f7ca5a24d42a218215..96793619356ed649a467513ebcd829a143798a57 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -11,6 +11,10 @@ else Kconfig := Kconfig endif +ifndef KBUILD_DEFCONFIG +KBUILD_DEFCONFIG := defconfig +endif + # We need this, in case the user has it in its environment unexport CONFIG_ @@ -96,7 +100,7 @@ savedefconfig: $(obj)/conf defconfig: $(obj)/conf @echo " Build default config" - $(Q)$< --defconfig=/dev/null $(Kconfig) + $(Q)$< --defconfig=$(KBUILD_DEFCONFIG) $(Kconfig) %_defconfig: $(obj)/conf $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) -- 2.43.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org