-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKconfig.comp
61 lines (46 loc) · 1.4 KB
/
Kconfig.comp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# SPDX-License-Identifier: GPL-2.0-or-later
menu "Compile Config"
config CC_IS_GCC
def_bool $(success,test "$(cc-name)" = GCC)
config CC_IS_CLANG
def_bool $(success,test "$(cc-name)" = Clang)
choice
prompt "Compiler Optimization Level"
default CC_OPTIMIZE_FOR_DEBUG
config CC_OPTIMIZE_FOR_DEBUG
bool "Optimize for Debug (-O0)"
config CC_OPTIMIZE_FOR_PERFORMANCE
bool "Optimize for Performance (-O2)"
config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for Size (-Os)"
endchoice # Compiler Optimization Level
config STRICT
bool "Compiling Kernel with Strict mode"
default y
help
Use -Wall and -Werror, To ensure kernel
security, please keep it open in the mainline
config STACKPROTECTOR
bool "Stack Protector buffer overflow detection"
depends on ARCH_HAS_STACKPROTECTOR
depends on $(cc-option,-fstack-protector)
default y
config STACKPROTECTOR_STRONG
bool "Strong Stack Protector"
depends on STACKPROTECTOR
depends on $(cc-option,-fstack-protector-strong)
default y
config KERNEL_DEBUG
bool "Kernel Generate Debug File"
depends on CC_OPTIMIZE_FOR_DEBUG || CC_OPTIMIZE_FOR_PERFORMANCE
default y
config KERNEL_MAP
bool "Kernel Generate Map File"
default y
config KERNEL_DUMP
bool "Kernel Generate Dump File"
default y
config LD_DEAD_CODE_DATA_ELIMINATION
bool "Dead Code and Data Elimination"
depends on EXPERT
endmenu # Compile Config