Browse Source

eanble option to debug optimized code

Waldemar Brodkorb 10 years ago
parent
commit
c79407bcee
2 changed files with 11 additions and 0 deletions
  1. 4 0
      mk/vars.mk
  2. 7 0
      target/config/Config.in.adk

+ 4 - 0
mk/vars.mk

@@ -124,7 +124,11 @@ TARGET_LDFLAGS+=	-flto
 endif
 
 ifneq ($(ADK_DEBUG),)
+ifeq ($(ADK_DEBUG_OPTS),y)
+TARGET_CFLAGS+=		-g3 -fno-omit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)
+else
 TARGET_CFLAGS+=		-g3 -fno-omit-frame-pointer
+endif
 else
 TARGET_CPPFLAGS+=	-DNDEBUG
 TARGET_CFLAGS+=		-fomit-frame-pointer $(ADK_TARGET_CFLAGS_OPT)

+ 7 - 0
target/config/Config.in.adk

@@ -33,6 +33,13 @@ config ADK_DEBUG
 	  All packages and libc will be compiled and packaged with debug information.
 	  Mostly useful for NFS root or big USB/CF or hard disk setups.
 
+config ADK_DEBUG_OPTS
+	bool "use optimization cflags"
+	depends on ADK_DEBUG
+	default n
+	help
+	  All packages and libc will be compiled with debug information and optimization flags on.
+
 config ADK_DEBUG_STRIP
 	bool "strip target binaries/libraries for gdbserver usage"
 	depends on ADK_DEBUG