On Sat, 23 Jul 2011 12:49:46 +0200 Radosław Smogura wrote: > This patch gives ability for add some "-fno-..." options for GCC > and to force -O1 optimization. Supporting files, like Kconfig, Makefile > are auto-generated due to large amount of available options (not all > included). > > Patch helps to debug kernel. > > Signed-off-by: Radosław Smogura <mail@xxxxxxxxxx> Hi, If possible, please post patches inline instead of as attachments. It makes patch review much easier. Comments on (generated) file lib/Kconfig.debug.optim. Please make corrections to the generating shell script. +menuconfig HACK_OPTIM + bool "Allows to override GCC optimization" bool "Allows overriding GCC optimizations" + depends on DEBUG_KERNEL && EXPERIMENTAL + help + If you say Y here you will be able to override + how GCC optimize kernel code. This will create how GCC optimizes kernel code. This creates + more debug friendly, but with not guarentee more debug-friendly code, but does not guarantee + about same runi, like production, kernel. the same running code like a production kernel. + + If you say Y here probably You will want say you will want to say <what> + for all suboptions suboptions. +config HACK_OPTIM_FORCE_O1_LEVEL + bool "Forces -O1 optimization level" + ---help--- + This will change how GCC optimize code. Code This changes how GCC optimizes code. + may be slower and larger but will be more debug + "friendly". + + In some cases there is low chance that kernel In some cases there is a low chance that the kernel + will run different then normal, reporting or not differently than normal, reporting or not reporting + some bugs or errors. Refere to GCC manual for Refer to the GCC + more details. + + You SHOULD say N here. +config HACK_OPTIM__fno_inline_functions_called_once + bool "Adds -fno-inline-functions-called-once parameter to gcc invoke line." + ---help--- Same comments as above. and same comments for all suboptions. --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html