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>
This commit is contained in:
		 Paul Spooren
					Paul Spooren
				
			
				
					committed by
					
						 Petr Štetiar
						Petr Štetiar
					
				
			
			
				
	
			
			
			 Petr Štetiar
						Petr Štetiar
					
				
			
						parent
						
							d509463816
						
					
				
				
					commit
					4ed356fa71
				
			| @@ -104,6 +104,7 @@ endif | |||||||
| KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS) | KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS) | ||||||
|  |  | ||||||
| KERNEL_MAKE_FLAGS = \ | KERNEL_MAKE_FLAGS = \ | ||||||
|  | 	KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \ | ||||||
| 	HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ | 	HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ | ||||||
| 	CROSS_COMPILE="$(KERNEL_CROSS)" \ | 	CROSS_COMPILE="$(KERNEL_CROSS)" \ | ||||||
| 	ARCH="$(LINUX_KARCH)" \ | 	ARCH="$(LINUX_KARCH)" \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user