public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Michael Hope <michael.hope@linaro.org>
To: Zhenqiang Chen <zhenqiang.chen@linaro.org>
Cc: yann.morin.1998@anciens.enib.fr, crossgcc@sourceware.org
Subject: Re: [PATCH] libc/newlib: Add optspace config for newlib
Date: Tue, 22 Nov 2011 20:23:00 -0000	[thread overview]
Message-ID: <CANLjY-mue0otPrwGrHvtP3czZzrucosVjChqDhgxGViP5K60og@mail.gmail.com> (raw)
In-Reply-To: <4ECB872F.8010101@linaro.org>

On Wed, Nov 23, 2011 at 12:27 AM, Zhenqiang Chen
<zhenqiang.chen@linaro.org> wrote:
> # HG changeset patch
> # User Zhenqiang Chen <zhenqiang.chen@linaro.org>
> # Date 1321942694 -28800
> # Node ID b28457252771ed67373226ced85317a6c03aac74
> # Parent  a6c68712024f406df7d2da4af377f51982615833
> libc/newlib: Add LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE (-Os) other than -O to
> control CFLAGS.
>
> Reviewed-by: Michael Hope
> Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
>
> diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
> --- a/config/libc/newlib.in.2
> +++ b/config/libc/newlib.in.2
> @@ -35,3 +35,11 @@
>          _write... If you plan to port newlib to a new
>          platform/board, say Yes.
>
> +config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
> +    bool
> +    prompt "Optimize newlib for size"
> +    default y
> +    help
> +      Pass --enable-target-optspace to newlib configure.
> +
> +      This will compile newlib with -Os.
> diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
> --- a/scripts/build/libc/newlib.sh
> +++ b/scripts/build/libc/newlib.sh
> @@ -85,6 +85,8 @@
>         newlib_opts+=( "--enable-newlib-supplied-syscalls" )
>     fi
>
> +    [ "${CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE}" = "y" ] &&
> newlib_opts+=("--enable-target-optspace")
> +
>     # Note: newlib handles the build/host/target a little bit differently
>     # than one would expect:
>     #   build  : not used

A question for the list: there's already a 'Optimise the GCC runtime
libraries for space' option.  Should it be promoted to something like
CT_ENABLE_TARGET_OPTSPACE and apply to all target libraries?  How you
you handle backwards compatibility of config files?

I have a similar problem with CC_STATIC_LIBSTDCXX.  GOLD is written in
C++ and really needs to have libstdc++ statically linked into it.  I'm
thinking of sending a patch that promotes CT_CC_STATIC_LIBSTDCXX to
CT_STATIC_LIBSTDCXX and uses it everywhere.

-- Michael

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

  reply	other threads:[~2011-11-22 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 11:28 Zhenqiang Chen
2011-11-22 20:23 ` Michael Hope [this message]
2011-11-22 22:14   ` Yann E. MORIN
2011-11-22 23:05 ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANLjY-mue0otPrwGrHvtP3czZzrucosVjChqDhgxGViP5K60og@mail.gmail.com \
    --to=michael.hope@linaro.org \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@anciens.enib.fr \
    --cc=zhenqiang.chen@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).