View previous topic :: View next topic |
Author |
Message |
stelth n00b
Joined: 25 May 2006 Posts: 45
|
Posted: Sat Oct 24, 2009 3:35 pm Post subject: Which gcc profile? |
|
|
I just updated my kernel (successfully, which was a surprise, I swear my machine is haunted).
The kernel wouldn't compile until I switched the gcc profile to sparc64-unknown-linux-gnu-4.3.3
I also noticed that the default selected gcc profile was sparc--unknown-linux-gnu-4.3.2.
Which profile should I be using for a 32-bit userland?
I tried the CROSS_COMPILE=sparc64-unknown-linux-gnu- while the 32-bit profile was selected, and was always met with a compiler not found error. I know I can put the entire path to the compiler in the CROSS_COMPILE variable, but didn't have an issue with this while installing, or on one previous kernel upgrade.
What should I set as the gcc profile for normal compiling, and will I need to switch it each time when compiling the kernel? _________________
Quote: | And on the 3rd day, God created the Remington bolt-action rifle; so that man could fight the dinosaurs and the homosexuals. AMEN. |
|
|
Back to top |
|
|
SamuliSuominen Retired Dev
Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Sat Oct 24, 2009 4:14 pm Post subject: |
|
|
Isn't that what sys-devel/kgcc64 is for? |
|
Back to top |
|
|
tcunha Retired Dev
Joined: 02 Apr 2007 Posts: 128
|
Posted: Wed Oct 28, 2009 4:10 pm Post subject: Re: Which gcc profile? |
|
|
Quote: | The kernel wouldn't compile until I switched the gcc profile to sparc64-unknown-linux-gnu-4.3.3 |
Right. That's because gcc-config configures your system so you can use that compiler properly (eg append the compiler's path to the PATH environment variable).
Quote: | I also noticed that the default selected gcc profile was sparc--unknown-linux-gnu-4.3.2. |
This is right, as well.
Quote: | Which profile should I be using for a 32-bit userland? |
They should be both selected when you use gcc-config -l, because on Gentoo (and, AFAIK on other Linux distributions) the kernel is 64-bit, and the userland is 32-bit (I think I remember seeing an experimental Debian project with a 64-bit userland). Now, the one which has a green star represents your userland compiler (32-bit), and the blue one, is your cross-compiler (64-bit) which is installed, as ssuominen said, by sys-devel/kgcc64.
There's an experimental multilib profile. You'd able to compile, and run 64-bit code, but the userland will remain 32-bit (GCC uses -m32 by default). Therefore, and since GCC will be bi-arch, you'll get rid of sys-devel/kgcc64.
Quote: | I tried the CROSS_COMPILE=sparc64-unknown-linux-gnu- while the 32-bit profile was selected, and was always met with a compiler not found error. I know I can put the entire path to the compiler in the CROSS_COMPILE variable, but didn't have an issue with this while installing, or on one previous kernel upgrade. |
Probably because it wasn't selected by gcc-config -l, and thus your environment wasn't properly configured.
Quote: | What should I set as the gcc profile for normal compiling, and will I need to switch it each time when compiling the kernel? |
They should be both selected. Nonetheless, when compiling a kernel >2.6.25, make sure you use make CROSS_COMPILE=sparc64-unknown-linux-gnu-.
HTH. |
|
Back to top |
|
|
stelth n00b
Joined: 25 May 2006 Posts: 45
|
Posted: Wed Oct 28, 2009 7:43 pm Post subject: |
|
|
You're right, both are selected when looking closer at gcc-config -l
sparc-unknown-linux-gnu-4.3.2 has a green star next to it
sparc64-unknown-linux-gnu-4.3.3 has a blue star next to it
However, with both profiles selected, I'm still not able to compile a kernel even when passing CROSS_COMPILE=sparc64-unkown-linux-gnu- on the command line. This goes away if I select the 64-bit profile, do the kernel compile, then select the 32-bit profile again. I thought having both selected like that was to make it so I didn't have to keep switching profiles. Maybe I missed something in the install or something got borked in an update. _________________
Quote: | And on the 3rd day, God created the Remington bolt-action rifle; so that man could fight the dinosaurs and the homosexuals. AMEN. |
|
|
Back to top |
|
|
|
|
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
|
|