[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1202564114-18587-5-git-send-email-jason.wessel@windriver.com>
Date: Sat, 9 Feb 2008 07:35:10 -0600
From: jason.wessel@...driver.com
To: linux-kernel@...r.kernel.org
Cc: Jason Wessel <jason.wessel@...driver.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH 4/8] kgdb: COPTIMIZE flag
From: Jason Wessel <jason.wessel@...driver.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@...driver.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Thomas Gleixner <tglx@...utronix.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists