]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fdt: Allow C++ comments in link scripts and DT files
authorSimon Glass <sjg@chromium.org>
Mon, 1 Oct 2018 18:22:43 +0000 (12:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Oct 2018 10:40:27 +0000 (04:40 -0600)
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 <sjg@chromium.org>
Makefile
scripts/Makefile.spl

index 3f2d494c4f980711bbc4cc2666e5347e47bd7687..aadd1ec8c69f0b634e65e15489d0d95627c3595c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1524,7 +1524,7 @@ $(defaultenv_h): $(CONFIG_DEFAULT_ENV_FILE:"%"=%) FORCE
 # ---------------------------------------------------------------------------
 quiet_cmd_cpp_lds = LDS     $@
 cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
-               -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $<
+               -D__ASSEMBLY__ -x assembler-with-cpp -std=c99 -P -o $@ $<
 
 u-boot.lds: $(LDSCRIPT) prepare FORCE
        $(call if_changed_dep,cpp_lds)
index c71497ff0080401f68665d6205167c04c7e87956..7416abec62ecfc084af87920d466f7de0b70a023 100644 (file)
@@ -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)