diff options
author | Paul Spooren <mail@aparcar.org> | 2019-10-08 13:11:27 -1000 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-10-09 09:13:44 +0200 |
commit | 4ed356fa719e8923c231524181e15ab67eb37bac (patch) | |
tree | 27a00a7c1f842860d5105d94221e47e292b71185 /include/kernel.mk | |
parent | d509463816bf593de841398914f0d9d68bf76458 (diff) | |
download | upstream-4ed356fa719e8923c231524181e15ab67eb37bac.tar.gz upstream-4ed356fa719e8923c231524181e15ab67eb37bac.tar.bz2 upstream-4ed356fa719e8923c231524181e15ab67eb37bac.zip |
kernel.mk: add KCFLAGS to make kmods reproducible
Some kmods (gpio-hotplug, wireguard) store the build path in the
compiled files and therefore make it harder to rebuild the official
binaries. As the same "iremap" function is used as for other binaries,
the change is compatible with gcc7 and 8.
Tested with both gcc7 and gcc8 resulting in build path independent
reproducible builds.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'include/kernel.mk')
-rw-r--r-- | include/kernel.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kernel.mk b/include/kernel.mk index 73645330fe..439e910ebf 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -104,6 +104,7 @@ endif KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS) KERNEL_MAKE_FLAGS = \ + KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \ HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ CROSS_COMPILE="$(KERNEL_CROSS)" \ ARCH="$(LINUX_KARCH)" \ |