From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id E62133858C2C for ; Thu, 18 Nov 2021 09:44:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E62133858C2C Received: by mail-wr1-x42d.google.com with SMTP id b12so10304276wrh.4 for ; Thu, 18 Nov 2021 01:44:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LQBvgVda4+aR3yoCTGeTttvSfuvJkpLhkz9ooFzBhso=; b=sox/i/VBdPVjOYlCiFqT6TFPxo8xGotXw/RkUTob5MowGzcWfEmdidfIkOfdi7hW8A uMhiFqPB2lcgbAbeZa2r58L4kXgV1RQ5dE7SrcQ41KR5OLIWWTE+F8Yqyz0Z6a2CvlMM iPlSZuqF0zTqwd98Ih3vaBEaGsPKmQECYQuPiaN69fzAea1Bc3vhtnPD5A0bL1t1kq+G S8XCXJUFXIm5mUtfOGGVtjW4/A2sL9W9aA9OiH5OKYnhLQl0Diyq4CCId/C5mheKhxxd xNKyT7tt+FI3TsGHHlYlF+hgY5g8U3hTxaSZ3vMBSJqRzTuHnCyXVNhFQ2Vw2IU2uMpC +gRQ== X-Gm-Message-State: AOAM530QqybacLLgotifSe+04UZt+4VkgyZQ3+XXsjRXrqLNvIs8Nxnc Ke8NRlQa29y3Ml7gc9hvs3vtNvlRSTRmtmU3SJc= X-Google-Smtp-Source: ABdhPJw3AymXCHKk1xev9Kk0piyb3QJeSZ3E+izD26KAF4fFiHB22rLYJeASq7m9U0n26YLSlGwoLj2Na8bWxIvRq9I= X-Received: by 2002:adf:f04d:: with SMTP id t13mr28796827wro.324.1637228668053; Thu, 18 Nov 2021 01:44:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 18 Nov 2021 09:44:16 +0000 Message-ID: Subject: Re: putting __glibcxx_assert_fail into debug.cc bloats binary size by introducing all the dead code with debug.cc To: unlvsur unlvsur Cc: "unlvsur unlvsur via Libstdc++" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 09:44:31 -0000 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?