summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/vars.mk4
-rw-r--r--target/config/Config.in.adk7
2 files changed, 11 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index a26dc0734..136dc5f2f 100644
--- a/mk/vars.mk
+++ b/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)
diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk
index 0c598e50c..7487ac056 100644
--- a/target/config/Config.in.adk
+++ b/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