aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen2012-03-28 13:51:18 -0500
committerH. Peter Anvin2012-03-30 12:15:21 -0500
commit1873e870fd63ee4b87dbe0125ca373e420fb4987 (patch)
tree2c4d4244c653e374a1d0040e581be60f614f23a7 /Makefile
parent35372a7d45291140a97518a8d1c8cb0e31ee2bb7 (diff)
downloadkernel-omap-1873e870fd63ee4b87dbe0125ca373e420fb4987.tar.gz
kernel-omap-1873e870fd63ee4b87dbe0125ca373e420fb4987.tar.xz
kernel-omap-1873e870fd63ee4b87dbe0125ca373e420fb4987.zip
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 <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1332960678-11879-2-git-send-email-andi@firstfloor.org Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1932984478c1..6f7328bca9c4 100644
--- a/Makefile
+++ b/Makefile
@@ -564,6 +564,16 @@ else
564KBUILD_CFLAGS += -O2 564KBUILD_CFLAGS += -O2
565endif 565endif
566 566
567ifdef CONFIG_READABLE_ASM
568# Disable optimizations that make assembler listings hard to read.
569# reorder blocks reorders the control in the function
570# ipa clone creates specialized cloned functions
571# partial inlining inlines only parts of functions
572KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
573 $(call cc-option,-fno-ipa-cp-clone,) \
574 $(call cc-option,-fno-partial-inlining)
575endif
576
567include $(srctree)/arch/$(SRCARCH)/Makefile 577include $(srctree)/arch/$(SRCARCH)/Makefile
568 578
569ifneq ($(CONFIG_FRAME_WARN),0) 579ifneq ($(CONFIG_FRAME_WARN),0)