[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: g++ oddity

On Thu, 15 Feb 1996 Dirk.Eddelbuettel@qed.econ.queensu.ca wrote:

> When at the final linking stage of building a C program, gcc is invoked with
> 	gcc -s -o foobar <all_the_rest> 
> I seem to remember that a subsequent strip does not gain any further
> reduction in size.
> Now, when I do the same thing with g++ for C++ code, strip is able to cut out
> a good deal. Is this due to the fact that all we currently have is a static 
> libg++ rather than a dynamic one (which I hope will come along soon) or is
> there more at stake? 

This isn't just a problem with g++ - the same has been noted with 
straight C code.  Ian Jackson, in a post here a while back, suggested 
that the guidelines would be changed to:

1. Compile with `-O2 -g';
2. Link without `-s' or `-g';
3. Install with `-s' to strip at this stage.  This does the stripping 
properly (the standalone `strip' program also works fine).

gcc's failure to strip properly is presumably a bug ...

Hope this helps,


Reply to: