public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: unlvsur unlvsur <unlvsur@live.com>
Cc: "unlvsur unlvsur via Libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: putting __glibcxx_assert_fail into debug.cc bloats binary size by introducing all the dead code with debug.cc
Date: Thu, 18 Nov 2021 09:51:47 +0000	[thread overview]
Message-ID: <CAH6eHdTTPrQT1debv2TBUDyOBcsAGHOsRC7L1tJRcZSwaR+K+w@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTuyemzhWkKzkPvs2s_4M=K10bgkvJYeDzOAvvhO4u8Fg@mail.gmail.com>

On Thu, 18 Nov 2021 at 09:44, Jonathan Wakely wrote:
>
> On Thu, 18 Nov 2021 at 09:12, unlvsur unlvsur wrote:
> > -O3. Removal of unused functions require additional non-standard often-unused compiler (-fdata-sections -ffunction-sections -Os) and linker (-Wl,--gc-sections) optimization flags.
>
> I asked why one of those flags doesn't help, and all you've done is
> quote something that says you need to use those flags. You realise
> that's not an answer, right?
>
> Libstdc++ is built with -fdata-sections -ffunction-sections -O2 and
> linked with -Wl,--gc-sections
>
> So why doesn't it help?

I guess the problem is that users need to link their own code with
-Wl,--gc-sections to get the benefit. But then if you care about the
size of the result, you should be doing that.

      reply	other threads:[~2021-11-18  9:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18  3:16 unlvsur unlvsur
2021-11-18  9:09 ` Jonathan Wakely
2021-11-18  9:12   ` unlvsur unlvsur
2021-11-18  9:14     ` unlvsur unlvsur
2021-11-18  9:44     ` Jonathan Wakely
2021-11-18  9:51       ` Jonathan Wakely [this message]

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=CAH6eHdTTPrQT1debv2TBUDyOBcsAGHOsRC7L1tJRcZSwaR+K+w@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=unlvsur@live.com \
    /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).