Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev - multiple compiler versions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Maxie
n00b
n00b


Joined: 06 Apr 2017
Posts: 26

PostPosted: Mon Dec 09, 2019 7:30 am    Post subject: crossdev - multiple compiler versions Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55200
Location: 56N 3W

PostPosted: Mon Dec 09, 2019 12:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Maxie
n00b
n00b


Joined: 06 Apr 2017
Posts: 26

PostPosted: Mon Dec 09, 2019 12:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum