View previous topic :: View next topic |
Author |
Message |
Maxie n00b

Joined: 06 Apr 2017 Posts: 26
|
Posted: Mon Dec 09, 2019 7:30 am Post subject: crossdev - multiple compiler versions |
|
|
I'm working on an avr project. It uses about 99.5-99.8% of flash memory of my target MCU and I'm looking for optimizations to give myself some breathing space.
I noticed that some older compiler versions produce smaller code and would like to try all from gcc-4 to gcc-10.
I tried emerging a second toolchain with a simple
Code: | crossdev -t avr --g 10 |
But it did nothing. I see that I still have gcc-9 and build logs look like they did pretty much nothing.
Is it possible to have multiple compiler versions in a single crossdev target or do I have to clean one to install another? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55200 Location: 56N 3W
|
Posted: Mon Dec 09, 2019 12:02 pm Post subject: |
|
|
Maxie,
gcc is slotted. Have as many versions as you like.
Code: | $ gcc-config -l
[1] aarch64-unknown-linux-gnu-8.3.0
[2] aarch64-unknown-linux-gnu-9.2.0 *
[3] armv6j-hardfloat-linux-gnueabi-8.3.0
[4] armv6j-hardfloat-linux-gnueabi-9.2.0 *
[5] armv7a-hardfloat-linux-gnueabi-8.3.0
[6] armv7a-hardfloat-linux-gnueabi-9.2.0 *
[7] avr-8.3.0
[8] avr-9.2.0 *
...
| I only have two for avr today.
You will need to get the old cross ebuilds from the repo and add them to your own overlay.
Be aware that there have been two C++ ABI changes in you compiler range. The last being at gcc-6.
Going back before that is a lot of work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
Maxie n00b

Joined: 06 Apr 2017 Posts: 26
|
Posted: Mon Dec 09, 2019 12:50 pm Post subject: |
|
|
Thanks for the answer. I'll figure out whether ABI changes are a problem for me.
I found out what happened in my case...
crossdev -t avr --g 10 emerges gcc-9.2. So it found that I got it installed already and did pretty much nothing.
Similarly, if I add --g N, it always emerges N-1. So...now I have a few versions already and I keep emerging.
But... is the behaviour of emerging 1 version lower than I request normal? |
|
Back to top |
|
 |
|