[U-Boot] [PATCH] Makefile: always call date with LANG=C set

Ilya Yanok yanok at emcraft.com
Mon Jun 21 16:13:21 CEST 2010


Ensure that date is called only with LANG=C locale set to make dates
locale neutral thus preventing lurking of non-ASCII characters into
U-Boot binary.

Signed-off-by: Ilya Yanok <yanok at emcraft.com>
---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 3e11f6f..685b7ef 100644
--- a/Makefile
+++ b/Makefile
@@ -385,8 +385,8 @@ $(VERSION_FILE):
 		@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
 
 $(TIMESTAMP_FILE):
-		@date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
-		@date +'#define U_BOOT_TIME "%T"' >> $@
+		@LANG=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+		@LANG=C date +'#define U_BOOT_TIME "%T"' >> $@
 
 gdbtools:
 		$(MAKE) -C tools/gdb all || exit 1
@@ -2476,6 +2476,6 @@ endif
 
 backup:
 	F=`basename $(TOPDIR)` ; cd .. ; \
-	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
+	gtar --force-local -zcvf `LANG=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
 
 #########################################################################
-- 
1.6.2.5



More information about the U-Boot mailing list