From 2c5eac1e1820163d3776e1f842550bfc4a88d136 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:11 -0600 Subject: Makefile: Add a warning if SPL/TPL cannot be built At present the build fails in strange ways if CONFIG_SPL is defined by CONFIG_SUPPORT_SPL is not. Add a warning for this case as it can be very confusing to debug. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/Makefile.spl') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index e494d185e4..c71497ff00 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -45,6 +45,13 @@ SPL_ := SPL_TPL_ := endif +ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl) +$(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL) +endif +ifeq ($(obj)$(CONFIG_SUPPORT_TPL),tpl) +$(error You cannot build TPL without enabling CONFIG_SUPPORT_TPL) +endif + include $(srctree)/config.mk include $(srctree)/arch/$(ARCH)/Makefile -- cgit From 44093a1554be9ca4d4e964710537a3d0014909b9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:43 -0600 Subject: fdt: Allow C++ comments in link scripts and DT files At present // in a device-tree file or link script causes a warning. But this is used in the standard license header. Update the compiler flags to use C99, which permits this. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/Makefile.spl') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index c71497ff00..7416abec62 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -371,7 +371,7 @@ $(u-boot-spl-dirs): $(u-boot-spl-platdata) quiet_cmd_cpp_lds = LDS $@ cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ - -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< + -D__ASSEMBLY__ -x assembler-with-cpp -std=c99 -P -o $@ $< $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE $(call if_changed_dep,cpp_lds) -- cgit