Re: -no_prelink and CC -ar on IRIX
* Albert Chin wrote on Fri, Mar 04, 2005 at 04:33:39AM CET: > On Fri, Mar 04, 2005 at 10:19:02AM +0900, Peter O'Gorman wrote: > > Albert Chin wrote: > > | On Thu, Mar 03, 2005 at 01:23:44PM -0600, Albert Chin wrote: > > | > > | Ok, this sucks. -no_prelink causes other problems. The SGI compiler > > | leaves template droppings in the ii_files directory that *must* be > > | copied when we extract the convenience library. Ugh. > > > > At the end of func_extract_archives it does a find: > > > > my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name > > \*.lo -print | $NL2SP` > > > > Does adding -o -name \*.ii to the list help at all? > > That won't help. After you copy over the .ii files, you must modify > them. I have a solution but I'm running into another problem I need to > solve. Just a note on this: C++ and templates need more support from Libtool, not just with this compiler. There have been other bug reports (with Portland's pgcc, for example). icc surely suffers as well. I'd really appreciate if someone knowledgeable would look into this. Otherwise, I plan to eventually do this, but it looks like it could be more than a little work, I don't have much time ATM. Regards, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: -no_prelink and CC -ar on IRIX
Ralf Wildenhues wrote: * Albert Chin wrote on Fri, Mar 04, 2005 at 04:33:39AM CET: On Fri, Mar 04, 2005 at 10:19:02AM +0900, Peter O'Gorman wrote: Albert Chin wrote: | On Thu, Mar 03, 2005 at 01:23:44PM -0600, Albert Chin wrote: | | Ok, this sucks. -no_prelink causes other problems. The SGI compiler | leaves template droppings in the ii_files directory that *must* be | copied when we extract the convenience library. Ugh. At the end of func_extract_archives it does a find: my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` Does adding -o -name \*.ii to the list help at all? That won't help. After you copy over the .ii files, you must modify them. I have a solution but I'm running into another problem I need to solve. Just a note on this: C++ and templates need more support from Libtool, not just with this compiler. There have been other bug reports (with Portland's pgcc, for example). icc surely suffers as well. icc (at least on debian and gentoo) does well. (for me, that is) i am using templates quite a lot with convenience libraries and libraries... I'd really appreciate if someone knowledgeable would look into this. Otherwise, I plan to eventually do this, but it looks like it could be more than a little work, I don't have much time ATM. Regards, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool smime.p7s Description: S/MIME Cryptographic Signature ___ http://lists.gnu.org/mailman/listinfo/libtool
PGI and C++ templates
Can I impose on the good will of a libtool wizard? I could attempt this myself, but I don't have a good track record mucking around in the LT source. ;-) Here's the situation: on branch-1-5, we have good PGI compiler support -- *except* for libraries with C++ templates. For that, we need some more work (someone identified this recently -- I'm afraid I don't remember who). I have mailed the PGI support folks (CC'ed on this mail) and they have told me what needs to be done (if you care, the full thread is here: http://www.pgroup.com/userforum/viewtopic.php? t=172&postdays=0&postorder=asc&start=0): -- For each source file in the library, compile it: $ pgCC -c --one_instantiation_per_object $(YOUR_FLAGS) file.cc You must now do an extra pre-link step to instantiate all the templates used in this library, putting all the library .o's on this line, and no -c flag. $ pgCC --one_instantiation_per_object --prelink_objects $(YOUR_FLAGS) file1.o file2.o etc. Achive or build the shared library as before, except you must include the new hidden templates in the Template.dir directory: $ ar qv lib_mylib.a Template.dir/*.o file1.o file2.o etc. - Is there any way someone can add this to Libtool (preferably both 1.5.x and 2.0.x), or provide me with some guidance on how to do so? (I did "ok" in tinkering around to add simple command line switch changes, but the multi-step outlined procedure would take me a lng time to figure out). There's one condition: this is only necessary for PGI compiler versions 5.2-4 and prior of their compiler. With their most recent version (soon to be released) -- 6.0 -- none of this is necessary, and what we have now in Libtool will work just fine (i.e., they cleaned up the compiler to do templates in libraries much better -- the entire multi-step process listed above is unnecessary). Here's a quick-n-easy way to get the version of the compiler: pgcc_major_ver=`pgCC -V | awk '/pgCC/ { print \$2 }' | cut -d. -f1` pgcc_need_extra=`expr $pgcc_major_ver \< 6` So if $pgcc_need_extra is 1, then we need to do the multi-step procedure listed above. How does that sound? -- {+} Jeff Squyres {+} [EMAIL PROTECTED] {+} http://www.lam-mpi.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool