lkml.org 
[lkml]   [2008]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/8] kgdb: COPTIMIZE flag
    Date
    From: Jason Wessel <jason.wessel@windriver.com>

    This patch adds in the ability to unoptimize a single kernel module to
    make source stepping more linear and not optimize out variables that
    the developer might like to inspect. It used with adding
    COPTIMIZE=-O0 to the build line when doing something like a single
    kernel module only build. Or you could use it to override the default
    optimization level entirely.

    Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    ---
    Makefile | 8 ++++++--
    1 files changed, 6 insertions(+), 2 deletions(-)

    diff --git a/Makefile b/Makefile
    index 89f2d8b..65aa7f8 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -502,10 +502,14 @@ endif # $(dot-config)
    all: vmlinux

    ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
    -KBUILD_CFLAGS += -Os
    +COPTIMIZE += -Os
    else
    -KBUILD_CFLAGS += -O2
    +COPTIMIZE += -O2
    endif
    +# COPTIMIZE may be overridden on the make command line with
    +# make ... COPTIMIZE=""
    +# The resulting object may be easier to debug with KGDB
    +KBUILD_CFLAGS += $(COPTIMIZE)

    include $(srctree)/arch/$(SRCARCH)/Makefile

    --
    1.5.4


    \
     
     \ /
      Last update: 2008-02-09 14:39    [W:0.019 / U:94.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site