This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-frepo vs. Borland model
- To: jbuck at synopsys dot com, egcs at cygnus dot com
- Subject: -frepo vs. Borland model
- From: Yotam Medini <yotamm at tmai dot com>
- Date: Mon, 15 Sep 1997 18:15:21 -0700
- Reply-To: yotam_medini at tmai dot com
> From: Joe Buck <jbuck@synopsys.com>
> Date: Fri, 12 Sep 97 16:42:32 PDT
> Cc: egcs@cygnus.com
>
> ....
> -frepo is in there, but I'm not really a fan of it. The Borland-like
> approach to resolving template definitions, also present, does the same
> thing faster (expand templates in each module, use weak symbols to resolve).
> The price is more code bloat, but no extra link passes. Folks might want
> to try -frepo to get a smaller executable after they have finished
> development; the repeated relinks -frepo gives you can be very slow,
> especially for STL users.
I also prefer the Borland method, provided the linker can support it.
That is to ignore multplied defined methods.
Is such linker is in egcs's scope?
> There have been vast improvements in templates. The main missing feature
> (as far as I'm concerned), template member functions, has just been added
> to the egcs snapshots.
Indeed great improvement! Comparing the object sizes:
telaviv:951> cat avi.cc
#include <vector>
int vi(const vector<int>& a, int i)
{
return a[i];
}
telaviv:952> g++ -c -O2 avi.cc; ls -l avi.o
-rw-r--r-- 1 yotamm products 3760 Sep 15 18:13 avi.o
telaviv:953> egcs++ -c -O2 avi.cc; ls -l avi.o
.... annoying warning messages ...
-rw-r--r-- 1 yotamm products 1420 Sep 15 18:13 avi.o
telaviv:954>
-- yotam