pgcc argument order

I am trying out the pgi compiler as an alternative to gcc but I find that most of the pre-existing makefiles have to be rewritten because the pgcc argument order is important. Here is an example of the most common argument order problem

pgCC -largy -L/usr/local/slocal/lib # where is in /usr/local/slocal/lib

gcc will interpret all of the -L arguments before the -l arguments to ensure that it finds everything, pgcc will not.

Is there a way to change this behavior? perhaps one of the many rc files?

Matt Harrington

Just to clarify, are you compiling C or C++? pgCC is the C++ compiler and pgcc is the C compiler. I ask because order shouldn’t matter with pgcc. With pgCC, the prelinker does require “-L” before “-l”.

  • Mat

This is a known problem that was introduced in 5.2-1, and will be fixed in 5.2-2