On Tue, Jun 16, 2009 at 2:05 PM, Ralf Wildenhues<ralf.wildenh...@gmx.de> wrote: > Hello Christopher, > > * Christopher Hulbert wrote on Tue, Jun 16, 2009 at 05:40:09PM CEST: >> PGI has compiler options to append libraries for PGI-compiled fortran >> and C++ code when performing a link. The attached patch lets >> ltmain.m4sh recognize them. > > Please explain what these switches do (or point to documentation), > so we can find out whether it's the right thing for libtool to just > ignore and pass through these switches, or whether it would need to > take any further action.
-pgcpplibs Append C++ libraries to the link line -pgf77libs Append pgf77 libraries to the link line -pgf90libs Append pgf90 libraries to the link line More documentation can be found in the PGI users guide (http://www.pgroup.com/doc/pgiug.pdf). > > Other than that, you can use `-Wc,FLAG' or `-Xcompiler FLAG' to get > flags by libtool, undetected, as a workaround. I know how to get flags by libtool. It didn't seem these were any less useful than the -tp switches, so I submitted it. Instead of using the autoconf-generated FCLIBS information from AC_FC_LIBRARY_LDFLAGS, I set FCLIBS=-pgf90libs. That flag gets put into my pkg-config file Libs information. Then when using pkg-config --libs, the -pgf90libs flag shows up, but libtool strips it out. Chris > > Thanks, > Ralf > >> --- a/libltdl/config/ltmain.m4sh >> +++ b/libltdl/config/ltmain.m4sh >> @@ -4496,8 +4496,10 @@ func_mode_link () >> # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC >> # @file GCC response files >> # -tp=* Portland pgcc target processor selection >> + # -pgf77libs, -pgf90libs, -pgcpplibs Portland compiler opts to append >> lib >> -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ >> - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) >> + >> -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-pgcpplibs| >> + -pgf77libs|-pgf90libs) > >