[Bug c++/43601] Enormous increase in DLL object files size in 4.5

vz-gcc at zeitlins dot org gcc-bugzilla@gcc.gnu.org
Wed Mar 31 22:25:00 GMT 2010



------- Comment #5 from vz-gcc at zeitlins dot org  2010-03-31 22:25 -------
(In reply to comment #3)
> And if the linker is taking a lot of memory, then it is a bug in the linker. 
> The linker should not take much more memory for functions which are linked
> once.

Let's admit this. How does it help us in practice? I'm not aware of any plans
to optimize the linker to deal with this situation better so the fact remains
that the users who could build wxWidgets before won't be able to build it any
more. How should we, as its developers, deal with it? Advise them to contribute
to binutils development? Somehow I am not sure if this is going to work really
well.

And I won't even mention that we still have .5GB of object files for each build
(and you may need to have several and this is not negligible even nowadays if
you use a 80GB SSD).

So while the ideal solution might be to avoid the generation of duplicate
copies of the functions in all object files or making the linker smarter the
fact is that in practice we have a big uncalled for and unwanted regression.
With the only justification (for non-ARM platforms) that "it really makes
sense". IMNSHO it doesn't make sense to break working builds of many thousands
of projects. If you think it does, please explain how should we deal with the
inevitable complaints about it when people start switching to gcc 4.5. I
frankly have absolutely no idea.

I won't insist any more but for one last time: Please, please, please try to
view the situation from a gcc user and not gcc developer point of view. Just
imagine that you try a new minor release of the compiler and suddenly the build
takes much longer or maybe doesn't complete at all because linker runs out of
memory. What are you going to do and how are you going to deal with it? And
this is not a whimsical scenario but will likely apply to the *majority* of
non-trivial C++ projects as many of them use some class library with a lot of
inline function inside dllexported classes, be it wxWidgets, Qt or whatever
else.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601



More information about the Gcc-bugs mailing list