mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
ANDROID: CC_FLAGS_CFI add -fno-sanitize-blacklist
Added the clang compiler option -fno-sanitize-blacklist to the CC_FLAGS_CFI variable. Without this flag, the make dependecy list files produced by clang, have the cfi_blacklist.txt as their first dependency. The dependecy lists are produced by the -Wp,-MD,filename option (for example: -Wp,-MD,mm/.mmap.o.d). The dependency lists are processed by the scripts/basic/fixdeps.c program, and are transformed into the .o.cmd files (for example: mm/.mmap.o.cmd). That file is meant to have the source code of the file listed in the source_* make variable (for example: source_mm/mmap.o). Instead of that that variable refers to the full pathname to the cfi_blacklist.txt file. Furthermore, the deps_* make variable is not supposed to include the source code file but it does include it. The cfi_blacklist.txt file is not required by the use of CFI for the kernel, use of the -fno-sanitize-blacklist causes the .o.cmd file to have the correct values in its source_* and dep_* variables. Signed-off-by: Ramon Pantin <pantin@google.com> Bug: 150504710 Test: interactively Change-Id: Ic31f0cfc59f29612373ec9ed63a326a84e496b68
This commit is contained in:
parent
ce5de62e20
commit
017d67e9a8
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
|
@ -891,7 +891,8 @@ endif
|
|||
|
||||
ifdef CONFIG_CFI_CLANG
|
||||
CC_FLAGS_CFI := -fsanitize=cfi \
|
||||
-fno-sanitize-cfi-canonical-jump-tables
|
||||
-fno-sanitize-cfi-canonical-jump-tables \
|
||||
-fno-sanitize-blacklist
|
||||
|
||||
ifdef CONFIG_MODULES
|
||||
CC_FLAGS_CFI += -fsanitize-cfi-cross-dso
|
||||
|
|
|
|||
Loading…
Reference in a new issue