This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
How about add two new configuration options(-ffunction-sections -fdata-sections)
- From: "Bin Cheng" <bin dot cheng at arm dot com>
- To: <newlib at sources dot redhat dot com>
- Date: Mon, 20 Feb 2012 12:02:28 +0800
- Subject: How about add two new configuration options(-ffunction-sections -fdata-sections)
Hi,
Now in newlib there are cases where different functions are implemented in
one c source file.
So how about adding two configuration options like
"--enable-function-sections"/"-fdata-sections"
which builds newlib with "-ffunction-sections" and "-fdata-sections"
options.
With this, we can cut binary size with link's option "--gc-sections".
Now in gcc, libgcc/libstdc++ are built with this options defaultly for cross
compiling.
Should we enable this in Newlib?
So what's your opinion on this?
Thanks.