diff mbox

[4/5] libc/musl: Add config option for extra developer warnings

Message ID 1409864217-17035-4-git-send-email-bryanhundven@gmail.com
State Superseded
Headers show

Commit Message

Bryan Hundven Sept. 4, 2014, 8:56 p.m. UTC
This commit adds a configuration knob for enabling extra developer
warnings to be enabled during the musl-libc build.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
---
 config/libc/musl.in.2      | 6 ++++++
 scripts/build/libc/musl.sh | 4 ++++
 2 files changed, 10 insertions(+)
diff mbox

Patch

diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
index 543cac3..bfdbae9 100644
--- a/config/libc/musl.in.2
+++ b/config/libc/musl.in.2
@@ -7,6 +7,12 @@  config LIBC_MUSL_DEBUG
       This option enables debugging information, this will increase the size of
       the resulting library.
 
+config LIBC_MUSL_WARNINGS
+    bool
+    prompt "Build with recommended warnings flags"
+    help
+      Build musl-libc with extra warnings, useful for musl-libc development.
+
 choice
     prompt "How to optimize musl-libc"
     default LIBC_MUSL_OPTIMIZE_AUTO
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index f2d005e..622380e 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -50,6 +50,10 @@  do_libc_configure() {
         extra_conf+=("--enable-debug")
     fi
 
+    if [ "${CT_LIBC_MUSL_WARNINGS}" = "y" ]; then
+        extra_conf+=("--enable-warnings")
+    fi
+
     if [ "${CT_LIBC_MUSL_OPTIMIZE_NONE}" = "y" ]; then
         extra_conf+=("--optimize=no")
     elif [ "${CT_LIBC_MUSL_OPTIMIZE_AUTO}" = "y" ]; then