rules for siterc file

Hi, just getting started with PGI community edition, very exciting :)

Is there a list of all the things one is allowed to do in the siterc file? The Site-Specific Customization of the Compilers documentation says what the names are and gives a few brief examples. I am looking to see what all the options are.

For example, I’ve just kind of been scrolling through posts here on the user forum and have seen a few that will be helpful. For example

switch -pthread is
append(LDLIB1=-lpthread);

Or I’ve also seen some like

switch -XXX is hide

which will be helpful for circumventing compiler flags that don’t have a mapping.

However, what I’m actually trying to do right now is figure out a way to get past an autotools generated Makefile:

pgcc-Error-Unknown switch: -isystem
pgcc-Error-Unknown switch: -include

I thought maybe I could get away with this in my siterc

switch -isystem is -I;
switch -include is -I;

but that doesn’t seem to be working. What are the rules here? Thanks for any help :)

Hi svenevs,

Hi, just getting started with PGI community edition, very exciting :)

Welcome!

Is there a list of all the things one is allowed to do in the siterc file?

We’ve never published the full documentation on our driver language which is used by the “rc” files. There’s nothing secret, it more a matter of supporting something that most users will never use.

switch -XXX is hide

This just hides the switch from being printed in the “-help” output, but doesn’t disable it.

switch -isystem is -I;
switch -include is -I;

Close. The syntax for mapping one flag to another is:

switch -isystem == -I;
switch -include == -I;

However since “-I” takes an argument, you may need to use this instead:

switch -include arg is shorthand(-I $arg);

Note that “siterc” applies to all compilations by all users. If want this change to just apply to your pgcc compilations, add this syntax to “.mypgccrc” in your home directory. “~/.mypgirc” will apply to all compilers but only for you.

Hope this helps,
Mat

Hi Mat,

Thanks for explaining how to do the include, the “has an argument” explanation is very helpful for any future ones I’ll run into for sure :)

And yes, fortunately I’m the only person on this system so I get to just stick with the siterc hehe. Makes my life a little easier!

Thanks again!