I am using GCC 4.2 with Mac OS X 10.5 and Xcode 3.1.1
When I build my library under GCC 4.0, the static library is ~400mb.
If the only switch I make is to GCC 4.2, that same library is ~1.2GB.
The issue seems to be with the amount of debugging information
generated as when I build the release version, GCC 4.2 produces a
smaller library then GCC 4.0.
I believe the only relevant flag that I am using is -gdwarf-2 for both
GCC 4.2 and GCC 4.0.
Is GCC 4.2 adding a far greater amount of debugging information to the
library?
What flags can control this?
The flags I found were:
-feliminate-dwarf2-dups
However, this flag generated a bunch of the following errors:
{standard input}:50796:Expected comma after segment-name
{standard input}:50796:Rest of line ignored. 1st junk character valued
32 ( ).
-feliminate-unused-debug-types
This flag didn't seem to affect the size of the library at all.
-glevel
I cannot go down to level 1 because of the information that would not
be included.
I cannot go up to level 3 because that would appear to just make the
library bigger.
Any comments, hints or suggestions?