Experience with g++ 4.8 and -frepo?

Jonathan Wakely jwakely@redhat.com
Wed Aug 27 10:59:00 GMT 2014


On 27/08/14 12:21 +0200, David Kastrup wrote:
>To my untrained eye that looks like the link exclusively fails on
>libstdc++ with everything in the application getting resolved.
>Obviously libstdc++-dev is installed in non-user-writable directories.

But all the undefined references are templates that should be
instantiated in your program, not in the libstdc++ library.

>Are there known issue with that kind of setup?  If -frepo supposed to
>work?  This is actually a rather big application, so it is an actually
>small number of problems for a broken feature, but still the problems
>are non-zero.

I have no idea if it still works or if it's expected to work with
libstdc++.

https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html does
say that "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 I've never
bothered using -frepo so don't know any more than what I've just read
there.

>Now -frepo is probably a non-starter here because of its impact on
>compile time.  It conceivably helps code size, however,

How? If you let the compiler do implicit instantiation the duplicate
code will be discarded at link-time.

> and it _does_
>make a difference regarding some problems with template specializations.

Which problems?



More information about the Libstdc++ mailing list