mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-05 00:53:32 +08:00
kernel: support setting extra CFLAGS for kernel compilation
They may be used e.g. to optimize kernel size or performance. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 907d7d747243044f86588f0d82993e8c106cb02c)
This commit is contained in:
parent
44fa330a82
commit
b0968be02e
@ -74,6 +74,10 @@ menuconfig DEVEL
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config KERNEL_CFLAGS
|
||||
string "Kernel extra CFLAGS" if DEVEL
|
||||
default ""
|
||||
|
||||
config EXTERNAL_KERNEL_TREE
|
||||
string "Use external kernel tree" if DEVEL
|
||||
default ""
|
||||
|
@ -101,7 +101,7 @@ endif
|
||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||
|
||||
KERNEL_MAKE_FLAGS = \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))" \
|
||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user