[source] kernel: check SOURCE_DATE_EPOCH before setting KBUILD_BUILD_TIMESTAMP

LEDE Commits lede-commits at lists.infradead.org
Sat Aug 13 06:52:11 PDT 2016


jogo pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=86ec4104181992400363e5602c11079e79524d9c

commit 86ec4104181992400363e5602c11079e79524d9c
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Sat Aug 13 15:47:48 2016 +0200

    kernel: check SOURCE_DATE_EPOCH before setting KBUILD_BUILD_TIMESTAMP
    
    Make sure SOURCE_DATE_EPOCH actually contains something.
    
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
---
 include/kernel-defaults.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 534699b..53e733a 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -12,7 +12,7 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
 	KBUILD_HAVE_NLS=no \
 	KBUILD_BUILD_USER="$(call qstrip,$(CONFIG_KERNEL_BUILD_USER))" \
 	KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \
-	KBUILD_BUILD_TIMESTAMP="$(shell date -u --date="@$(SOURCE_DATE_EPOCH)")" \
+	$(if $(SOURCE_DATE_EPOCH),KBUILD_BUILD_TIMESTAMP="$(shell date -u --date="@$(SOURCE_DATE_EPOCH)")") \
 	KBUILD_BUILD_VERSION="0" \
 	CONFIG_SHELL="$(BASH)" \
 	$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \



More information about the lede-commits mailing list