I'm looking to remove the unused sections of the iostream and stdc++
library from my executable. I'm planning to use the options -ffunction-
sections, -fdata-sections and --gc-sections to accomplish this.
I think libstdc++.a has to be built with the options -ffunction-sections, -
fdata-sections for this to work though. Can someone confirm this to be
true? If so, is the libstdc++ that comes with a typical mingw install built
with those options enabled? If it's not then is a rebuild of libstdc++ with
those options necessary?
For the latter case, how can I go about building libstdc++ for my mingw
setup? Do I just download the trunk svn for libstdc++ and do the normal
config + make from MSYS?
Please advise, thanks.