aboutsummaryrefslogtreecommitdiff
path: root/linux/linux.mk
diff options
context:
space:
mode:
authorGravatar Jean-Baptiste Trédez <jean-baptiste.tredez@basystemes.fr>2016-12-07 16:20:42 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-12-07 23:34:52 +0100
commit10fc02b984f6f8c06291f94e6dbef0b289fd3880 (patch)
tree09d1a5dfc7351f6a31693b762dc4b1342156f9a4 /linux/linux.mk
parent520d9975bda643d2cdea6007baf0411c2ea622a5 (diff)
downloadbuildroot-10fc02b984f6f8c06291f94e6dbef0b289fd3880.tar.gz
buildroot-10fc02b984f6f8c06291f94e6dbef0b289fd3880.tar.bz2
linux: generate KBUILD_BUILD_TIMESTAMP date whith LC_ALL=C
Fix kernel reproducible build if a non-C locale is used on the host system. When building the Linux kernel, scripts/gen_initramfs_list.sh does 'date -d"$KBUILD_BUILD_TIMESTAMP" +%s'. In linux.mk, Buildroot sets KBUILD_BUILD_TIMESTAMP to "$(shell date -d @$(SOURCE_DATE_EPOCH))". For example, if LANG=fr_FR.UTF-8 is defined in the host system, it does not work: - LC_ALL=C date -d"$(LC_ALL=C date)" : ok - LC_ALL=C date -d"$(LC_ALL=fr_FR.UTF-8 date)" : error LANG/LC_ALL variables exported in the main Makefiles are not passed in the $(shell ...) sub-shells. Signed-off-by: Jean-Baptiste Trédez <jean-baptiste.tredez@basystemes.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'linux/linux.mk')
-rw-r--r--linux/linux.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 7e826ccdf0..e75dcaa60d 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -99,7 +99,7 @@ LINUX_MAKE_ENV += \
KBUILD_BUILD_VERSION=1 \
KBUILD_BUILD_USER=buildroot \
KBUILD_BUILD_HOST=buildroot \
- KBUILD_BUILD_TIMESTAMP="$(shell date -d @$(SOURCE_DATE_EPOCH))"
+ KBUILD_BUILD_TIMESTAMP="$(shell LC_ALL=C date -d @$(SOURCE_DATE_EPOCH))"
endif
# Get the real Linux version, which tells us where kernel modules are