From: Ming Cheng <chengm349@hotmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Fw: binary size
Date: Tue, 4 Jan 2022 11:46:26 +0000 [thread overview]
Message-ID: <SI2PR03MB524204EB017DC5CAC2F7BAE4FB4A9@SI2PR03MB5242.apcprd03.prod.outlook.com> (raw)
In-Reply-To: <SI2PR03MB52424F304B6A4DE6B7DEC49BFB4A9@SI2PR03MB5242.apcprd03.prod.outlook.com>
Compilation flag are similar/same except some more error/warn ignore flags for c++20.
________________________________
From: Ming Cheng <chengm349@hotmail.com>
Sent: Tuesday, January 4, 2022 11:42 AM
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Fw: binary size
Hi Jonathan,
I just pasted a lib. It's applicable to binary. I am wondering whether there is a way to generate smaller binary by ver 10.2.1 close to 7.3.1? Would bigger size binary slower ?
regard
Ming
________________________________
From: Jonathan Wakely <jwakely.gcc@gmail.com>
Sent: Tuesday, January 4, 2022 7:53 AM
To: Ming Cheng <chengm349@hotmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Fw: binary size
On Tue, 4 Jan 2022, 02:13 Ming Cheng via Gcc-help, <gcc-help@gcc.gnu.org<mailto:gcc-help@gcc.gnu.org>> wrote:
________________________________
From: Ming Cheng <Ming.Cheng@flextrade.com<mailto:Ming.Cheng@flextrade.com>>
Sent: Tuesday, January 4, 2022 2:10 AM
To: Ming Cheng <chengm349@hotmail.com<mailto:chengm349@hotmail.com>>
Subject: binary size
Hi,
If I use
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-rw-r--r-- 1 mcheng flexusr 4632980 Jan 4 09:54 libfilelog.a
If I use
g++ (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-rw-r--r-- 1 mcheng flexusr 7008006 Jan 4 10:08 libfilelog.a
How to reduce binary size generated by C++20 compiler?
You're just looking at the file size, and it's not a binary. The difference is probably due to additional debug info produced by the new GCC. Other things can affect it too, like optimization settings.
Why do you want to reduce it? What is your real goal?
next prev parent reply other threads:[~2022-01-04 11:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <MW3PR18MB3675DED196E7FA7E19455E15804A9@MW3PR18MB3675.namprd18.prod.outlook.com>
2022-01-04 2:12 ` Ming Cheng
2022-01-04 7:53 ` Jonathan Wakely
2022-01-04 11:42 ` Ming Cheng
2022-01-04 11:46 ` Ming Cheng [this message]
2022-01-04 12:12 ` Jonathan Wakely
[not found] ` <SI2PR03MB5242FA109CAEDEBF0896B2AAFB4B9@SI2PR03MB5242.apcprd03.prod.outlook.com>
2022-01-05 8:10 ` Ming Cheng
2022-01-05 8:13 ` Jonathan Wakely
2022-01-05 9:15 ` Ming Cheng
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=SI2PR03MB524204EB017DC5CAC2F7BAE4FB4A9@SI2PR03MB5242.apcprd03.prod.outlook.com \
--to=chengm349@hotmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.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).