public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/36274] New: Please improve usage of template libs. @ 2008-05-20 9:02 bursig at gmail dot com 2008-05-20 12:42 ` [Bug c++/36274] " rguenth at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: bursig at gmail dot com @ 2008-05-20 9:02 UTC (permalink / raw) To: gcc-bugs Currently when we want use template libs approach (and not instance template in all *.o files where it is included) we have to use -fno-implicit-templates flag. The problem is that this flag change total g++ behavior and "nuke" all templates which is problematic when we want store only own templates in own libs. Please consider "port" Sun CC functionality which allow fetching templates from external library (*.a/*.so/*.o) during compilation phase via "-instlib" flag. This flag request on compiler to not emit code for instantiated implicitly (i.e. by use) templates found in directed libs (-inslib=libXXX.a) and leave resolving of those code to linker. All libs/objects files added in -instlib=xxx flag have to be link with target. Such functionality will nice improve build time of project which heavily use templates from external libs (like on Sun CC) and not force us to totally change project like for -fno-implicit-templates flag. *.o files (example pch.o): - compiler should fetch global and local symbols list. *.a files: - compiler should fetch global and local symbols list. *.so - compiler should fetch global symbols list. -- Summary: Please improve usage of template libs. Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bursig at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/36274] Please improve usage of template libs. 2008-05-20 9:02 [Bug c++/36274] New: Please improve usage of template libs bursig at gmail dot com @ 2008-05-20 12:42 ` rguenth at gcc dot gnu dot org 2008-05-20 13:11 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-05-20 12:42 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2008-05-20 12:42 ------- -frepo is/was supposed to deal with this -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/36274] Please improve usage of template libs. 2008-05-20 9:02 [Bug c++/36274] New: Please improve usage of template libs bursig at gmail dot com 2008-05-20 12:42 ` [Bug c++/36274] " rguenth at gcc dot gnu dot org @ 2008-05-20 13:11 ` pinskia at gcc dot gnu dot org 2008-05-20 16:07 ` bursig at gmail dot com 2008-05-20 16:22 ` bursig at gmail dot com 3 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-05-20 13:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pinskia at gcc dot gnu dot org 2008-05-20 13:10 ------- Also you might want want to look into the GCC extension (to C++98/C++03) called extern template whch does the same thing. Note it is being added to C++0x already. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/36274] Please improve usage of template libs. 2008-05-20 9:02 [Bug c++/36274] New: Please improve usage of template libs bursig at gmail dot com 2008-05-20 12:42 ` [Bug c++/36274] " rguenth at gcc dot gnu dot org 2008-05-20 13:11 ` pinskia at gcc dot gnu dot org @ 2008-05-20 16:07 ` bursig at gmail dot com 2008-05-20 16:22 ` bursig at gmail dot com 3 siblings, 0 replies; 7+ messages in thread From: bursig at gmail dot com @ 2008-05-20 16:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from bursig at gmail dot com 2008-05-20 16:07 ------- (In reply to comment #1) > -frepo is/was supposed to deal with this > As I know -frepo simple force -fno-implicit-templates which rip all template instantion from all objects and produce additional special files which are needed for new/additional pre-link compiler call which inject missing implementation. I'm not expert here but I suppose that gcc will simple build it even some of those symbols will be available during link. Sun propose simpler methodology... compiler know during build phase (via -instlib) what (and what not) templates instance will be available during link and simple don't emit code for it. There is no special pre-link phase, no special files only normal linking (and unknown symbols when you don't and proper -llibs flags). As I know Sun CC per-default add stl implementation library via -instlib which reduce build time of know/"prebuild in lib" stl templates instantions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/36274] Please improve usage of template libs. 2008-05-20 9:02 [Bug c++/36274] New: Please improve usage of template libs bursig at gmail dot com ` (2 preceding siblings ...) 2008-05-20 16:07 ` bursig at gmail dot com @ 2008-05-20 16:22 ` bursig at gmail dot com 3 siblings, 0 replies; 7+ messages in thread From: bursig at gmail dot com @ 2008-05-20 16:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from bursig at gmail dot com 2008-05-20 16:21 ------- (In reply to comment #2) > Also you might want want to look into the GCC extension (to C++98/C++03) called > extern template whch does the same thing. Note it is being added to C++0x > already. > > -- Pinski > Yes I know about it and I use it but in large project many libs come form another teams or another vendors who simple are not interested in such build time optimizations. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-36274-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/36274] Please improve usage of template libs. [not found] <bug-36274-4@http.gcc.gnu.org/bugzilla/> @ 2021-08-31 21:30 ` pinskia at gcc dot gnu.org 2021-09-01 8:23 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-08-31 21:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think C++ modules will fix this. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/36274] Please improve usage of template libs. [not found] <bug-36274-4@http.gcc.gnu.org/bugzilla/> 2021-08-31 21:30 ` pinskia at gcc dot gnu.org @ 2021-09-01 8:23 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 7+ messages in thread From: redi at gcc dot gnu.org @ 2021-09-01 8:23 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36274 --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think it should be closed as WONTFIX, we're not going to implement the proposal. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-01 8:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-05-20 9:02 [Bug c++/36274] New: Please improve usage of template libs bursig at gmail dot com 2008-05-20 12:42 ` [Bug c++/36274] " rguenth at gcc dot gnu dot org 2008-05-20 13:11 ` pinskia at gcc dot gnu dot org 2008-05-20 16:07 ` bursig at gmail dot com 2008-05-20 16:22 ` bursig at gmail dot com [not found] <bug-36274-4@http.gcc.gnu.org/bugzilla/> 2021-08-31 21:30 ` pinskia at gcc dot gnu.org 2021-09-01 8:23 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).