But yes, it's strange that gcc supports AVR and not PIC, being similar architectures.
? ? ? similar in that they are both 8bit? There is a reason gcc compiler writers didn't even pick up the ten foot pole for the pic mcu.
Saves about 50% of code space.
That is quite optimistic, and that number probably comes from the brochure. They probably got that number years ago when it was probably true and are still using it (early days of banksel every other instruction -> banksel when needed, probably got them the 50% they still claim).
This compiled with v2.31-
https://github.com/cv007/3DigitLedopt flash/ram
0 5633/321
1 5200/321
2 5080/319
3 5194/319
s 5080/319
For 32 and 16 bit i had to search for some 256 byte hash, and replace with another, that was easy.
I dont know what to look for and replace with in the XC8 version.
Forum member Karel explained it is illegal for XC8, so he did not tell i guess
For their 32 and 16 bit versions, all you have to do is add a tiny text file to a folder, and there is no modification to any files (my earlier link for xc8-avr is in the same repository that describes the xc16/32 versions).
The xc8-pic compiler takes about 5 minutes with objdump, a calculator, and a hex editor, if you know what you are looking for (basically 2 bytes to change, not that I have done it). When you study the gpl source code for the others, you can figure out a shorter path than dealing with the hashes/xclm which was the long way to get to the destination. When you understand what they are doing in the gpl code, its doesn't take a rocket scientist to understand whats going on the pic version which is not that much different in this area. Not really worth the trouble, though.
The better solution to all of this is pick your toolchain before you pick your mcu. In the end the restrictions are more of an annoyance than a problem, but they still annoy. One of the best things the arm cortex series has going for it, is you get a compiler that is up to date (not stuck at version 5), is used by everyone, and you can go to arm to download it any time you want without restrictions/registration/or any other hassles (or get it via a hundred other ways). Now that you picked a good compiler, you can choose your flavor of mcu to match, and you will have a good selection to choose from.