aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>2012-01-13 18:16:17 +0200
committerPekka Enberg <penberg@kernel.org>2012-01-13 19:23:42 +0200
commitcf436c8843664d9aa140c286d137db2f47cb7696 (patch)
tree542733c617018a806204baf22af5ad293c827073
parent10d321d7138f537d38cedf8aa6f00ad5a06778d8 (diff)
downloadjato-cf436c8843664d9aa140c286d137db2f47cb7696.tar.gz
x86-64: disable GDB support for normal builds
GDB doesn't give us sensible backtraces when building without debugging CFLAGS. Moreover, registering compiled methods with GDB could impact performance needlessly. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--Makefile2
-rw-r--r--arch/x86/include/arch/config_64.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 93318612..b95b7503 100644
--- a/Makefile
+++ b/Makefile
@@ -246,7 +246,7 @@ DEFAULT_CFLAGS += $(INCLUDES)
DEBUG =
ifeq ($(strip $(DEBUG)),1)
# This overrides DEFAULT_CFLAGS, but not user-supplied CFLAGS.
- DEFAULT_CFLAGS += -O0 -ggdb
+ DEFAULT_CFLAGS += -O0 -ggdb -DCONFIG_DEBUG
endif
DEFAULT_LIBS = -L. -ljvm -lrt -lpthread -lm -ldl -lz -lbfd -lopcodes -liberty -Lboehmgc -lboehmgc $(ARCH_LIBS)
diff --git a/arch/x86/include/arch/config_64.h b/arch/x86/include/arch/config_64.h
index 695df092..0e43d836 100644
--- a/arch/x86/include/arch/config_64.h
+++ b/arch/x86/include/arch/config_64.h
@@ -3,5 +3,8 @@
#define USE_FFI 1
#define CONFIG_ARGS_MAP 1
#define ARCH_NAME "x86-64"
-#define CONFIG_GDB
+
+#ifdef CONFIG_DEBUG
+#define CONFIG_GDB 1
+#endif