summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adk/tools/pkgmaker.c5
-rw-r--r--mk/vars.mk7
-rw-r--r--target/config/Config.in.adk7
3 files changed, 14 insertions, 5 deletions
diff --git a/adk/tools/pkgmaker.c b/adk/tools/pkgmaker.c
index 271e48eb7..b8aa87f7f 100644
--- a/adk/tools/pkgmaker.c
+++ b/adk/tools/pkgmaker.c
@@ -955,9 +955,8 @@ int main() {
/* handle debug subpackages */
fprintf(cfg, "\nconfig ADK_PACKAGE_%s_DBG\n", toupperstr(pkg_debug));
- fprintf(cfg, "\tprompt \"add debug symbols package\"\n");
- fprintf(cfg, "\tboolean\n");
- fprintf(cfg, "\tdepends on ADK_PACKAGE_GDB\n");
+ fprintf(cfg, "\tbool \"add debug symbols package\"\n");
+ fprintf(cfg, "\tdepends on ADK_PACKAGE_GDB && ADK_BUILD_WITH_DEBUG\n");
fprintf(cfg, "\tdepends on !ADK_DEBUG\n");
fprintf(cfg, "\tdepends on ADK_PACKAGE_%s\n", toupperstr(pkg_debug));
fprintf(cfg, "\tdefault n\n");
diff --git a/mk/vars.mk b/mk/vars.mk
index 6f3f5d270..bf51a378b 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -237,12 +237,15 @@ TARGET_CFLAGS+= -mlongcalls -mtext-section-literals
TARGET_CXXFLAGS+= -mlongcalls -mtext-section-literals
endif
-# add configured cflags for optimization
+# add configured compiler flags for optimization
TARGET_CFLAGS+= $(ADK_TARGET_CFLAGS_OPT)
TARGET_CXXFLAGS+= $(ADK_TARGET_CFLAGS_OPT)
-# always add debug information
+
+# add compiler flags for debug information
+ifeq ($(ADK_BUILD_WITH_DEBUG),y)
TARGET_CFLAGS+= -g3
TARGET_CXXFLAGS+= -g3
+endif
ifneq ($(ADK_DEBUG),)
TARGET_CFLAGS+= -fno-omit-frame-pointer
diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk
index 90759cea2..62b162f0f 100644
--- a/target/config/Config.in.adk
+++ b/target/config/Config.in.adk
@@ -17,6 +17,13 @@ config ADK_DL_DIR
Configure the download directory for all source packages.
Use an absolute path.
+config ADK_BUILD_WITH_DEBUG
+ bool "Build everything with debug information and allow debug packages"
+ default n
+ help
+ If you want to create debug packages, you should enable this option.
+ WARNING: It will use a lot of aditional disk space on you build system!
+
config ADK_DISABLE_HONOUR_CFLAGS
bool "Disable honour CFLAGS checks globally"
default n