diff mbox series

[U-Boot,39/45] fdt: Allow C++ comments in link scripts and DT files

Message ID 20181001182249.129565-40-sjg@chromium.org
State Accepted
Commit 44093a1554be9ca4d4e964710537a3d0014909b9
Delegated to: Simon Glass
Headers show
Series Various fixes and improvements | expand

Commit Message

Simon Glass Oct. 1, 2018, 6:22 p.m. UTC
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             | 2 +-
 scripts/Makefile.spl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass Oct. 9, 2018, 11:54 p.m. UTC | #1
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             | 2 +-
 scripts/Makefile.spl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index f578cce3663..5d4533b4243 100644
--- a/Makefile
+++ b/Makefile
@@ -1521,7 +1521,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)
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index c71497ff008..7416abec62e 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)