mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
debug: Add CONFIG_READABLE_ASM
Add a config option to disable various gcc compiler optimizations that make assembler listings much harder to read. This is everything that reorders code significantly or creates partial functions. This is mainly to keep kernel hackers sane. Signed-off-by: Andi Kleen <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
This commit is contained in:
parent
35372a7d45
commit
1873e870fd
2 changed files with 19 additions and 0 deletions
10
Makefile
10
Makefile
|
|
@ -564,6 +564,16 @@ else
|
|||
KBUILD_CFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifdef CONFIG_READABLE_ASM
|
||||
# Disable optimizations that make assembler listings hard to read.
|
||||
# reorder blocks reorders the control in the function
|
||||
# ipa clone creates specialized cloned functions
|
||||
# partial inlining inlines only parts of functions
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
|
||||
$(call cc-option,-fno-ipa-cp-clone,) \
|
||||
$(call cc-option,-fno-partial-inlining)
|
||||
endif
|
||||
|
||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||
|
||||
ifneq ($(CONFIG_FRAME_WARN),0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue