This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/4] libc/musl: Add config option for debugging info


This option enables a configuration knob for adding debugging info.

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

diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
index 96101a0..33a653c 100644
--- a/config/libc/musl.in.2
+++ b/config/libc/musl.in.2
@@ -1,5 +1,12 @@
 # musl second-part option
 
+config LIBC_MUSL_DEBUG
+    bool
+    prompt "Build with debugging information"
+    help
+      This option enables debugging information, this will increase the size of
+      the resulting library.
+
 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 6d77786..0b5b7da 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -46,6 +46,10 @@ do_libc_configure() {
         extra_cflags+=("-fno-toplevel-reorder")
     fi
 
+    if [ "${CT_LIBC_MUSL_DEBUG}" = "y" ]; then
+        extra_config+=("--enable-debug")
+    fi
+
     extra_config+=( "--optimize=${CT_LIBC_MUSL_OPTIMIZE}" )
 
     # NOTE: musl handles the build/host/target a little bit differently
-- 
2.1.0


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]