* [Buildroot] [PATCH v2] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LC_ALL=C
@ 2016-12-07 15:20 Jean-Baptiste Trédez
2016-12-07 22:37 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Baptiste Trédez @ 2016-12-07 15:20 UTC (permalink / raw)
To: buildroot
Fix kernel reproducible build if LANG=fr_FR.UTF-8 or LC_ALL=fr_FR.UTF-8 in host system.
when building linux kernel, scripts/gen_initramfs_list.sh do 'date -d"$KBUILD_BUILD_TIMESTAMP" +%s'
In buildroot makefile, KBUILD_BUILD_TIMESTAMP="$(shell date -d @$(SOURCE_DATE_EPOCH))"
if LANG=fr_FR.UTF-8 in 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 used in the $(shell ...) sub-shells.
Signed-off-by: Jean-Baptiste Tr?dez <jean-baptiste.tredez@basystemes.fr>
---
Changes in v2:
- use LC_ALL=C instead of LANG=C
linux/linux.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux/linux.mk b/linux/linux.mk
index a63d1f3..2b776a9 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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LC_ALL=C
2016-12-07 15:20 [Buildroot] [PATCH v2] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LC_ALL=C Jean-Baptiste Trédez
@ 2016-12-07 22:37 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-12-07 22:37 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 7 Dec 2016 16:20:42 +0100, Jean-Baptiste Tr?dez wrote:
> Fix kernel reproducible build if LANG=fr_FR.UTF-8 or LC_ALL=fr_FR.UTF-8 in host system.
>
> when building linux kernel, scripts/gen_initramfs_list.sh do 'date -d"$KBUILD_BUILD_TIMESTAMP" +%s'
> In buildroot makefile, KBUILD_BUILD_TIMESTAMP="$(shell date -d @$(SOURCE_DATE_EPOCH))"
> if LANG=fr_FR.UTF-8 in 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 used in the $(shell ...) sub-shells.
>
> Signed-off-by: Jean-Baptiste Tr?dez <jean-baptiste.tredez@basystemes.fr>
> ---
> Changes in v2:
> - use LC_ALL=C instead of LANG=C
Applied to master, after tweaking the commit title and commit log a bit.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-07 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 15:20 [Buildroot] [PATCH v2] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LC_ALL=C Jean-Baptiste Trédez
2016-12-07 22:37 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox