From: Jeff Law Date: Fri, 14 Nov 1997 01:57:05 +0000 (-0700) Subject: Add -frepo docs. X-Git-Tag: releases/egcs-1.0.0~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a155c14722a1d3173b2cfcd39719947d588c540;p=thirdparty%2Fgcc.git Add -frepo docs. From-SVN: r16479 --- diff --git a/gcc/extend.texi b/gcc/extend.texi index 6a250a94487b..b72de89c38a5 100644 --- a/gcc/extend.texi +++ b/gcc/extend.texi @@ -3230,6 +3230,30 @@ In the mean time, you have the following options for dealing with template instantiations: @enumerate +@item +Compile your template-using code with @samp{-frepo}. The compiler will +generate files with the extension @samp{.rpo} listing all of the +template instantiations used in the corresponding object files which +could be instantiated there; the link wrapper, @samp{collect2}, will +then update the @samp{.rpo} files to tell the compiler where to place +those instantiations and rebuild any affected object files. The +link-time overhead is negligible after the first pass, as the compiler +will continue to place the instantiations in the same files. + +This is your best option for application code written for the Borland +model, as it will just work. Code written for the Cfront model will +need to be modified so that the template definitions are available at +one or more points of instantiation; usually this is as simple as adding +@code{#include } to the end of each template header. + +For library code, if you want the library to provide all of the template +instantiations it needs, just try to link all of its object files +together; the link will fail, but cause the instantiations to be +generated as a side effect. Be warned, however, that this may cause +conflicts if multiple libraries try to provide the same instantiations. +For greater control, use explicit instantiation as described in the next +option. + @item Compile your code with @samp{-fno-implicit-templates} to disable the implicit generation of template instances, and explicitly instantiate