Microchip uses GCC as the base for its C30 compiler for PIC24/dsPIC30/dsPIC33. They have also published the source according to GPL requirement.
John Steele Scott has done some good jobs to patch the Microchip sources and provided the Debian templates to build debian packages.
Instruction for V3.01b (patches and Debian Templates)
Old version V2.05
Old version V2.00 and related information