0043-build-move-definition-of-KBUILD_BUILD_TIMESTAMP-to-include-kernel.mk.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: Alexander Couzens <lynxis@fe80.eu>
  2. Date: Tue, 13 Jun 2017 13:04:35 +0200
  3. Subject: build: move definition of KBUILD_BUILD_TIMESTAMP to include/kernel.mk
  4. Fixes: 0aed054bec (build: add KERNEL_MAKE and KERNEL_MAKE_FLAGS
  5. variables and move to kernel.mk)
  6. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
  7. diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
  8. index 05f4be02c82c80ea9c86b351b0e6192a8d21d3f9..138a3d01454b5f5b763effeb68eafa27e80f940e 100644
  9. --- a/include/kernel-defaults.mk
  10. +++ b/include/kernel-defaults.mk
  11. @@ -5,12 +5,6 @@
  12. # See /LICENSE for more information.
  13. #
  14. -ifneq ($(SOURCE_DATE_EPOCH),)
  15. - ifndef DUMP
  16. - KBUILD_BUILD_TIMESTAMP:=$(shell perl -e 'print scalar gmtime($(SOURCE_DATE_EPOCH))')
  17. - endif
  18. -endif
  19. -
  20. ifdef CONFIG_STRIP_KERNEL_EXPORTS
  21. KERNEL_MAKEOPTS += \
  22. EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
  23. diff --git a/include/kernel.mk b/include/kernel.mk
  24. index 779d24ac5c654347e69eba127c63b256136376df..98c8c283a8d8ca24108274991808e9f63ab5f4ff 100644
  25. --- a/include/kernel.mk
  26. +++ b/include/kernel.mk
  27. @@ -10,6 +10,12 @@ CHECK:=1
  28. DUMP:=1
  29. endif
  30. +ifneq ($(SOURCE_DATE_EPOCH),)
  31. + ifndef DUMP
  32. + KBUILD_BUILD_TIMESTAMP:=$(shell perl -e 'print scalar gmtime($(SOURCE_DATE_EPOCH))')
  33. + endif
  34. +endif
  35. +
  36. ifeq ($(__target_inc),)
  37. ifndef CHECK
  38. include $(INCLUDE_DIR)/target.mk