It’s generally not a good idea to change any of the rcfile files found in the compiler directory. Changing these files can result in undesirable behavior. We recommend that this type of change be done in the “.mypgccrc”, “.mypg90rc”, “.mypgf77rc”, “.mypgcpprc”, and “.mypghprrc” files in your home directory. Of course, this can be difficult to effect a change for all compilers and users so with the up coming 6.0 release we’ve added a new “siterc” which will give you better control. Also with 6.0, we’ll include more instructions on working with rc files.
The variable that will work best for you is “LMP” found in the “lin86rc” file. This variable sets which libraries are included when “-mp” is used. Adding the following line to your “.mypgXXrc” files should do what you need:
set LMP = -l$(PREFIX)mp -l$(PREFIX)thread -lyourlibhere ;
Also add “-L/PATH/to/yourlib” if you do not put you library in a standard location. To test, run the compilers with the “-dryrun” flag and make sure that the new library is found on the link line.