Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <jezz@sysmic.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LANG=C
Date: Tue, 06 Dec 2016 14:02:45 +0100	[thread overview]
Message-ID: <4282667.A5TpXGPufD@sagittea> (raw)
In-Reply-To: <1481019001-11035-1-git-send-email-jean-baptiste.tredez@basystemes.fr>

Hello Jean-Baptiste,

On Tuesday 06 December 2016 11:10:01 Jean-Baptiste Tr?dez wrote:
> Fix kernel reproducible build if LANG=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 :
> - LANG=C date -d"$(LANG=C date)" : ok
> - LANG=C date -d"$(LANG=fr_FR.UTF-8 date)" : error

Good catch.

> ---
>  linux/linux.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index a63d1f3..554c5f1 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 LANG=C date -d @$(SOURCE_DATE_EPOCH))"

It should also possible to fix problem using backquotes:

  KBUILD_BUILD_TIMESTAMP="`date -d @$(SOURCE_DATE_EPOCH)`"

I find it lighter.



BR,

-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

  parent reply	other threads:[~2016-12-06 13:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 10:10 [Buildroot] [PATCH] Makefile: generate KBUILD_BUILD_TIMESTAMP date whith LANG=C Jean-Baptiste Trédez
2016-12-06 10:33 ` Thomas Petazzoni
2016-12-06 10:48   ` Jean-Baptiste Tredez
2016-12-06 13:02 ` Jérôme Pouiller [this message]
2016-12-06 16:41   ` Jean-Baptiste Tredez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4282667.A5TpXGPufD@sagittea \
    --to=jezz@sysmic.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox