* [PATCH 3/4] libc/musl: Add config option for debugging info
2014-09-04 23:20 [PATCH 1/4] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
@ 2014-09-04 23:20 ` Bryan Hundven
2014-09-04 23:20 ` [PATCH 2/4] libc/musl: Add options for optimization Bryan Hundven
2014-09-04 23:20 ` [PATCH 4/4] libc/musl: Add config option for extra developer warnings Bryan Hundven
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Hundven @ 2014-09-04 23:20 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 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/4] libc/musl: Remove gcc core pass-1 from musl-libc build
@ 2014-09-04 23:20 Bryan Hundven
2014-09-04 23:20 ` [PATCH 3/4] libc/musl: Add config option for debugging info Bryan Hundven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bryan Hundven @ 2014-09-04 23:20 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.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
---
config/libc/musl.in | 2 +-
scripts/build/libc/musl.sh | 9 +--------
2 files changed, 2 insertions(+), 9 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..f997d25 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[@]}" \
@@ -73,13 +73,6 @@ do_libc_start_files() {
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] 4+ messages in thread
* [PATCH 4/4] libc/musl: Add config option for extra developer warnings
2014-09-04 23:20 [PATCH 1/4] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
2014-09-04 23:20 ` [PATCH 3/4] libc/musl: Add config option for debugging info Bryan Hundven
2014-09-04 23:20 ` [PATCH 2/4] libc/musl: Add options for optimization Bryan Hundven
@ 2014-09-04 23:20 ` Bryan Hundven
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Hundven @ 2014-09-04 23:20 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 33a653c..9c35836 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 0b5b7da..e96efe1 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -50,6 +50,10 @@ do_libc_configure() {
extra_config+=("--enable-debug")
fi
+ if [ "${CT_LIBC_MUSL_WARNINGS}" = "y" ]; then
+ extra_config+=("--enable-warnings")
+ 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/4] libc/musl: Add options for optimization
2014-09-04 23:20 [PATCH 1/4] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
2014-09-04 23:20 ` [PATCH 3/4] libc/musl: Add config option for debugging info Bryan Hundven
@ 2014-09-04 23:20 ` Bryan Hundven
2014-09-04 23:20 ` [PATCH 4/4] libc/musl: Add config option for extra developer warnings Bryan Hundven
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Hundven @ 2014-09-04 23:20 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 | 39 +++++++++++++++++++++++++++++++++++++++
scripts/build/libc/musl.sh | 6 +++++-
2 files changed, 44 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..96101a0
--- /dev/null
+++ b/config/libc/musl.in.2
@@ -0,0 +1,39 @@
+# 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 "Use musl-libc's automatic optimization"
+ 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
+
+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
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index f997d25..6d77786 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_config
# From buildroot:
# gcc constant folding bug with weak aliases workaround
@@ -45,6 +46,8 @@ do_libc_configure() {
extra_cflags+=("-fno-toplevel-reorder")
fi
+ 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
@@ -57,7 +60,8 @@ do_libc_configure() {
--host="${CT_TARGET}" \
--target="${CT_TARGET}" \
--prefix="/usr" \
- --disable-gcc-wrapper
+ --disable-gcc-wrapper \
+ "${extra_config[@]}"
}
do_libc_start_files() {
--
2.1.0
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-04 23:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 23:20 [PATCH 1/4] libc/musl: Remove gcc core pass-1 from musl-libc build Bryan Hundven
2014-09-04 23:20 ` [PATCH 3/4] libc/musl: Add config option for debugging info Bryan Hundven
2014-09-04 23:20 ` [PATCH 2/4] libc/musl: Add options for optimization Bryan Hundven
2014-09-04 23:20 ` [PATCH 4/4] libc/musl: Add config option for extra developer warnings 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).