public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 5/5] config/gcc: Disable CC_GCC_LIBSANITIZER for musl-libc
  2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
  2014-09-04 20:57 ` [PATCH 4/5] libc/musl: Add config option for extra developer warnings Bryan Hundven
@ 2014-09-04 20:57 ` Bryan Hundven
  2014-09-04 20:57 ` [PATCH 2/5] libc/musl: Add options for optimization Bryan Hundven
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2014-09-04 20:57 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

Disable libsanitizer for musl-libc.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
---
 config/cc/gcc.in.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 1b9515c..b088515 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -148,7 +148,7 @@ config CC_GCC_LIBSANITIZER
     prompt "Compile libsanitizer"
     depends on CC_GCC_HAS_LIBSANITIZER
     depends on THREADS_NATIVE
-    depends on ! LIBC_uClibc # Currently lacks required headers (like netrom.h)
+    depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h)
     help
       libsanitizer is a library which provides run-time sanitising of either
       or both of:
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/5] libc/musl: Add config option for debugging info
  2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
                   ` (2 preceding siblings ...)
  2014-09-04 20:57 ` [PATCH 2/5] libc/musl: Add options for optimization Bryan Hundven
@ 2014-09-04 20:57 ` Bryan Hundven
  2014-09-04 22:35   ` Yann E. MORIN
  2014-09-04 22:33 ` [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Yann E. MORIN
  4 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2014-09-04 20:57 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

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 42f45e1..543cac3 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 bd7ae2a..f2d005e 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_conf+=("--enable-debug")
+    fi
+
     if [ "${CT_LIBC_MUSL_OPTIMIZE_NONE}" = "y" ]; then
         extra_conf+=("--optimize=no")
     elif [ "${CT_LIBC_MUSL_OPTIMIZE_AUTO}" = "y" ]; then
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/5] libc/musl: Add options for optimization
  2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
  2014-09-04 20:57 ` [PATCH 4/5] libc/musl: Add config option for extra developer warnings Bryan Hundven
  2014-09-04 20:57 ` [PATCH 5/5] config/gcc: Disable CC_GCC_LIBSANITIZER for musl-libc Bryan Hundven
@ 2014-09-04 20:57 ` Bryan Hundven
  2014-09-04 21:24   ` Yann E. MORIN
  2014-09-04 20:57 ` [PATCH 3/5] libc/musl: Add config option for debugging info Bryan Hundven
  2014-09-04 22:33 ` [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Yann E. MORIN
  4 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2014-09-04 20:57 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

This commit adds configuration knobs for optimizing musl-libc.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
---
 config/libc/musl.in.2      | 32 ++++++++++++++++++++++++++++++++
 scripts/build/libc/musl.sh | 14 +++++++++++++-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 config/libc/musl.in.2

diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
new file mode 100644
index 0000000..42f45e1
--- /dev/null
+++ b/config/libc/musl.in.2
@@ -0,0 +1,32 @@
+# musl second-part option
+
+choice
+    prompt "How to optimize musl-libc"
+    default LIBC_MUSL_OPTIMIZE_AUTO
+
+config LIBC_MUSL_OPTIMIZE_NONE
+    bool
+    prompt "Do not optimize musl-libc"
+    help
+      This option sets `--optimize=no'
+
+config LIBC_MUSL_OPTIMIZE_AUTO
+    bool
+    prompt "Optimize musl-libc based CFLAGS passed"
+    help
+      This option allows musl-libc's ./configure script to automatically
+      set the optimization.
+
+config LIBC_MUSL_OPTIMIZE_SPEED
+    bool
+    prompt "Optimize musl-libc for speed"
+    help
+      This option sets `--optimize=yes'
+
+config LIBC_MUSL_OPTIMIZE_SIZE
+    bool
+    prompt "Optimize musl-libc for size"
+    help
+      This option sets `--optimize=size'
+
+endchoice
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index 6dbf657..bd7ae2a 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -37,6 +37,7 @@ do_libc_check_config() {
 do_libc_configure() {
     CT_DoLog EXTRA "Configuring C library"
     local -a extra_cflags
+    local -a extra_conf
 
     # From buildroot:
     # gcc constant folding bug with weak aliases workaround
@@ -45,6 +46,16 @@ do_libc_configure() {
         extra_cflags+=("-fno-toplevel-reorder")
     fi
 
+    if [ "${CT_LIBC_MUSL_OPTIMIZE_NONE}" = "y" ]; then
+        extra_conf+=("--optimize=no")
+    elif [ "${CT_LIBC_MUSL_OPTIMIZE_AUTO}" = "y" ]; then
+        extra_conf+=("--optimize=auto")
+    elif [ "${CT_LIBC_MUSL_OPTIMIZE_SPEED}" = "y" ]; then
+        extra_conf+=("--optimize=yes")
+    elif [ "${CT_LIBC_MUSL_OPTIMIZE_SIZE}" = "y" ]; then
+        extra_conf+=("--optimize=size")
+    fi
+
     # NOTE: musl handles the build/host/target a little bit differently
     # then one would expect:
     #   build   : not used
@@ -56,7 +67,8 @@ do_libc_configure() {
     ./configure                     \
         --host="${CT_TARGET}"       \
         --target="${CT_TARGET}"     \
-        --prefix="/usr"
+        --prefix="/usr"             \
+        "${extra_config[@]}"
 }
 
 do_libc_start_files() {
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 4/5] libc/musl: Add config option for extra developer warnings
  2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
@ 2014-09-04 20:57 ` Bryan Hundven
  2014-09-04 20:57 ` [PATCH 5/5] config/gcc: Disable CC_GCC_LIBSANITIZER for musl-libc Bryan Hundven
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2014-09-04 20:57 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

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 --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
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build
@ 2014-09-04 20:57 Bryan Hundven
  2014-09-04 20:57 ` [PATCH 4/5] libc/musl: Add config option for extra developer warnings Bryan Hundven
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Bryan Hundven @ 2014-09-04 20:57 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

In an effort to make the toolchain build simpler, remove the need for
the pass-1 build of gcc.

Also, let musl's configure script decide if we need the gcc wrapper or
not.

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

diff --git a/config/libc/musl.in b/config/libc/musl.in
index b3bec26..8f393b2 100644
--- a/config/libc/musl.in
+++ b/config/libc/musl.in
@@ -3,7 +3,7 @@
 ## depends on ! WINDOWS && ! BARE_METAL
 ##
 ## select LIBC_SUPPORT_THREADS_NATIVE
-## select CC_CORE_PASSES_NEEDED
+## select CC_CORE_PASS_2_NEEDED
 ##
 ## help Musl is a new standard library to power a new generation of Linux-based
 ## help devices. musl is lightweight, fast, simple, free, and strives to be
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index 7172cf2..6dbf657 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -48,7 +48,7 @@ do_libc_configure() {
     # NOTE: musl handles the build/host/target a little bit differently
     # then one would expect:
     #   build   : not used
-    #   host    : the machine building musl
+    #   host    : the machine musl runs on
     #   target  : the machine musl runs on
     CT_DoExecLog CFG                \
     CFLAGS="${extra_cflags[@]}"     \
@@ -56,30 +56,11 @@ do_libc_configure() {
     ./configure                     \
         --host="${CT_TARGET}"       \
         --target="${CT_TARGET}"     \
-        --prefix="/usr"             \
-        --disable-gcc-wrapper
+        --prefix="/usr"
 }
 
 do_libc_start_files() {
-    CT_DoStep INFO "Installing C library headers"
-
-    # Simply copy files until musl has the ability to build out-of-tree
-    CT_DoLog EXTRA "Copying sources to build directory"
-    CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}" \
-                            "${CT_BUILD_DIR}/build-libc-headers"
-    cd "${CT_BUILD_DIR}/build-libc-headers"
-
-    do_libc_configure
-
-    CT_DoLog EXTRA "Installing headers"
-    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install-headers
-
-    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" \
-        crt/crt1.o crt/crti.o crt/crtn.o
-    CT_DoExecLog ALL cp -av crt/crt*.o "${CT_SYSROOT_DIR}/usr/lib"
-    CT_DoExecLog ALL ${CT_TARGET}-gcc -nostdlib \
-        -nostartfiles -shared -x c /dev/null -o "${CT_SYSROOT_DIR}/usr/lib/libc.so"
-    CT_EndStep
+    :
 }
 
 do_libc() {
-- 
2.1.0


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/5] libc/musl: Add options for optimization
  2014-09-04 20:57 ` [PATCH 2/5] libc/musl: Add options for optimization Bryan Hundven
@ 2014-09-04 21:24   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-09-04 21:24 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc

Bryan, All,

On 2014-09-04 13:56 -0700, Bryan Hundven spake thusly:
> This commit adds configuration knobs for optimizing musl-libc.
> 
> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
> ---
>  config/libc/musl.in.2      | 32 ++++++++++++++++++++++++++++++++
>  scripts/build/libc/musl.sh | 14 +++++++++++++-
>  2 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 config/libc/musl.in.2
> 
> diff --git a/config/libc/musl.in.2 b/config/libc/musl.in.2
> new file mode 100644
> index 0000000..42f45e1
> --- /dev/null
> +++ b/config/libc/musl.in.2
> @@ -0,0 +1,32 @@
> +# musl second-part option
> +
> +choice
> +    prompt "How to optimize musl-libc"
> +    default LIBC_MUSL_OPTIMIZE_AUTO
> +
> +config LIBC_MUSL_OPTIMIZE_NONE
> +    bool
> +    prompt "Do not optimize musl-libc"
> +    help
> +      This option sets `--optimize=no'
> +
> +config LIBC_MUSL_OPTIMIZE_AUTO
> +    bool
> +    prompt "Optimize musl-libc based CFLAGS passed"

Wrong prompt (as already seen on IRC).

> +    help
> +      This option allows musl-libc's ./configure script to automatically
> +      set the optimization.
> +
> +config LIBC_MUSL_OPTIMIZE_SPEED
> +    bool
> +    prompt "Optimize musl-libc for speed"
> +    help
> +      This option sets `--optimize=yes'

"Speed" vs. "yes"  <-- correct?

> +config LIBC_MUSL_OPTIMIZE_SIZE
> +    bool
> +    prompt "Optimize musl-libc for size"
> +    help
> +      This option sets `--optimize=size'
> +
> +endchoice

What about adding:

    config LIBC_MUSL_OPTIMIZE
        string
        default "no"   if LIBC_MUSL_OPTIMIZE_NONE
        default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
        default "yes"  if LIBC_MUSL_OPTIMIZE_SPEED
        default "size" if LIBC_MUSL_OPTIMIZE_SIZE

And then...  [1]

> diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
> index 6dbf657..bd7ae2a 100644
> --- a/scripts/build/libc/musl.sh
> +++ b/scripts/build/libc/musl.sh
> @@ -37,6 +37,7 @@ do_libc_check_config() {
>  do_libc_configure() {
>      CT_DoLog EXTRA "Configuring C library"
>      local -a extra_cflags
> +    local -a extra_conf

extra_config  [0]

>      # From buildroot:
>      # gcc constant folding bug with weak aliases workaround
> @@ -45,6 +46,16 @@ do_libc_configure() {
>          extra_cflags+=("-fno-toplevel-reorder")
>      fi
>  
> +    if [ "${CT_LIBC_MUSL_OPTIMIZE_NONE}" = "y" ]; then
> +        extra_conf+=("--optimize=no")
> +    elif [ "${CT_LIBC_MUSL_OPTIMIZE_AUTO}" = "y" ]; then
> +        extra_conf+=("--optimize=auto")
> +    elif [ "${CT_LIBC_MUSL_OPTIMIZE_SPEED}" = "y" ]; then
> +        extra_conf+=("--optimize=yes")
> +    elif [ "${CT_LIBC_MUSL_OPTIMIZE_SIZE}" = "y" ]; then
> +        extra_conf+=("--optimize=size")
> +    fi

[1] use it here instead of all the if-else blocks:
    extra_config+=( "--optimize=${CT_LIBC_MUSL_OPTIMIZE}" )

>      # NOTE: musl handles the build/host/target a little bit differently
>      # then one would expect:
>      #   build   : not used
> @@ -56,7 +67,8 @@ do_libc_configure() {
>      ./configure                     \
>          --host="${CT_TARGET}"       \
>          --target="${CT_TARGET}"     \
> -        --prefix="/usr"
> +        --prefix="/usr"             \
> +        "${extra_config[@]}"

[0] Because that's what you're using here (and we are using everywhere
else, too.)

Regards,
Yann E. MORIN.

>  }
>  
>  do_libc_start_files() {
> -- 
> 2.1.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build
  2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
                   ` (3 preceding siblings ...)
  2014-09-04 20:57 ` [PATCH 3/5] libc/musl: Add config option for debugging info Bryan Hundven
@ 2014-09-04 22:33 ` Yann E. MORIN
  4 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-09-04 22:33 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc

Bryan, All,

On 2014-09-04 13:56 -0700, Bryan Hundven spake thusly:
> In an effort to make the toolchain build simpler, remove the need for
> the pass-1 build of gcc.
> 
> Also, let musl's configure script decide if we need the gcc wrapper or
> not.

Well, sh4rm4 said on IRC that we definitely do not need the wrapper:

00:11 < sh4rm4> musl-gcc is a wrapper to use musl on a glibc sys
00:11 <@y_morin> sh4rm4: So if we build our gcc with --target=blabla-musl
                 we do not need the wrapper, do we?
00:11 < sh4rm4> works by fixing up gcc's paths using a specs file
00:11 < sh4rm4> no

So, I think we still want to explicitly disable it.

> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
> ---
>  config/libc/musl.in        |  2 +-
>  scripts/build/libc/musl.sh | 25 +++----------------------
>  2 files changed, 4 insertions(+), 23 deletions(-)
> 
> diff --git a/config/libc/musl.in b/config/libc/musl.in
> index b3bec26..8f393b2 100644
> --- a/config/libc/musl.in
> +++ b/config/libc/musl.in
> @@ -3,7 +3,7 @@
>  ## depends on ! WINDOWS && ! BARE_METAL
>  ##
>  ## select LIBC_SUPPORT_THREADS_NATIVE
> -## select CC_CORE_PASSES_NEEDED
> +## select CC_CORE_PASS_2_NEEDED
>  ##
>  ## help Musl is a new standard library to power a new generation of Linux-based
>  ## help devices. musl is lightweight, fast, simple, free, and strives to be
> diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
> index 7172cf2..6dbf657 100644
> --- a/scripts/build/libc/musl.sh
> +++ b/scripts/build/libc/musl.sh
> @@ -48,7 +48,7 @@ do_libc_configure() {
>      # NOTE: musl handles the build/host/target a little bit differently
>      # then one would expect:
>      #   build   : not used
> -    #   host    : the machine building musl
> +    #   host    : the machine musl runs on
>      #   target  : the machine musl runs on
>      CT_DoExecLog CFG                \
>      CFLAGS="${extra_cflags[@]}"     \
> @@ -56,30 +56,11 @@ do_libc_configure() {
>      ./configure                     \
>          --host="${CT_TARGET}"       \
>          --target="${CT_TARGET}"     \
> -        --prefix="/usr"             \
> -        --disable-gcc-wrapper
> +        --prefix="/usr"
>  }
>  
>  do_libc_start_files() {
> -    CT_DoStep INFO "Installing C library headers"
> -
> -    # Simply copy files until musl has the ability to build out-of-tree
> -    CT_DoLog EXTRA "Copying sources to build directory"
> -    CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}" \
> -                            "${CT_BUILD_DIR}/build-libc-headers"
> -    cd "${CT_BUILD_DIR}/build-libc-headers"
> -
> -    do_libc_configure
> -
> -    CT_DoLog EXTRA "Installing headers"
> -    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install-headers
> -
> -    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" \
> -        crt/crt1.o crt/crti.o crt/crtn.o
> -    CT_DoExecLog ALL cp -av crt/crt*.o "${CT_SYSROOT_DIR}/usr/lib"
> -    CT_DoExecLog ALL ${CT_TARGET}-gcc -nostdlib \
> -        -nostartfiles -shared -x c /dev/null -o "${CT_SYSROOT_DIR}/usr/lib/libc.so"
> -    CT_EndStep
> +    :

As seen on IRC: no headers installed, you picked your host headers. ;-)

Regards,
Yann E. MORIN.

>  }
>  
>  do_libc() {
> -- 
> 2.1.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/5] libc/musl: Add config option for debugging info
  2014-09-04 20:57 ` [PATCH 3/5] libc/musl: Add config option for debugging info Bryan Hundven
@ 2014-09-04 22:35   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-09-04 22:35 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc

Bryan, All,

On 2014-09-04 13:56 -0700, Bryan Hundven spake thusly:
> 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 42f45e1..543cac3 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 bd7ae2a..f2d005e 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_conf+=("--enable-debug")

Do not forget to rename that to extra_config. ;-)
Ditto patch 4/5.

Regards,
Yann E. MORIN.

> +    fi
> +
>      if [ "${CT_LIBC_MUSL_OPTIMIZE_NONE}" = "y" ]; then
>          extra_conf+=("--optimize=no")
>      elif [ "${CT_LIBC_MUSL_OPTIMIZE_AUTO}" = "y" ]; then
> -- 
> 2.1.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/5] libc/musl: Add config option for debugging info
  2014-09-05  6:34 [PATCH v3 0/5] Add musl-libc options Bryan Hundven
@ 2014-09-05  6:34 ` Bryan Hundven
  0 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2014-09-05  6:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Bryan Hundven

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 32e9013..5c265c8 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 d1aadfa..2690bf2 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+=( "--enable-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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-05  6:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 20:57 [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
2014-09-04 20:57 ` [PATCH 4/5] libc/musl: Add config option for extra developer warnings Bryan Hundven
2014-09-04 20:57 ` [PATCH 5/5] config/gcc: Disable CC_GCC_LIBSANITIZER for musl-libc Bryan Hundven
2014-09-04 20:57 ` [PATCH 2/5] libc/musl: Add options for optimization Bryan Hundven
2014-09-04 21:24   ` Yann E. MORIN
2014-09-04 20:57 ` [PATCH 3/5] libc/musl: Add config option for debugging info Bryan Hundven
2014-09-04 22:35   ` Yann E. MORIN
2014-09-04 22:33 ` [PATCH 1/5] libc/musl: Remove gcc core pass-1 from musl-libc build Yann E. MORIN
2014-09-05  6:34 [PATCH v3 0/5] Add musl-libc options Bryan Hundven
2014-09-05  6:34 ` [PATCH 3/5] libc/musl: Add config option for debugging info Bryan Hundven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).