Atmel's avr-gcc is free and many other vendors are supporting both gcc and a for-money compiler (for certain definitions of "their" and "supporting.")
For PIC32 (or some PIC32s, anyway), you can think about downloading the "mpide" environment. This is an arduino-clone IDE, which of course includes an appropriate copy of gcc for mips, newlib, and etc that can be used from cli or other IDEs. (available for three OSes; no compiling required.) "They" have gone to some effort to avoid microchip-licensed libraries in favor of open source.