from Robert Swindells:
How do you make a package use gcc from pkgsrc ?
Tried setting the following but it is still using /usr/bin/gcc.
USE_PKGSRC_GCC= yes
USE_NATIVE_GCC= no
GCC_REQD+= 8
Correcting a little slip on my part:
I believe you would have to adjust PATH, but notice that gcc packages seem to be installed to a subdirectory of /usr/pkg, like /usr/pkg/gcc5 or /usr/pkg/gcc5-aux : not part of the normal PATH. You would have to put /usr/pkg/gcc5-aux/bin, or /usr/pkg/gcc5/bin , etc, as the case may be, at the front of the PATH, ahead or /usr/bin .
Tom