Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18024 - wrong gcc gets used when cross compiling with distcc
Summary: wrong gcc gets used when cross compiling with distcc
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Lisa Seelye (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 18933 29558
Blocks: 17858
  Show dependency tree
 
Reported: 2003-03-22 22:03 UTC by James Boddington (RETIRED)
Modified: 2011-10-30 22:38 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Boddington (RETIRED) gentoo-dev 2003-03-22 22:03:36 UTC
When using distcc in a cross platform environment the remote machines can use the incorrect gcc if 
they are a different architecture. Distcc uses the same name for the compiler on the remote machine 
as it does on the local machine. Emerge currently uses gcc as the compiler name. The remote gcc is 
not always for the same arch. If the full name is used for gcc (eg sparc-unknown-linux-gnu) the 
remote machine will then use the correct gcc even if it is a different arch. 

Reproducible: Always
Steps to Reproduce:
1. local machine sparc-unknown-linux-gnu, remote machine i686-pc-linux-gnu 
2. emerge <package> 
3. 
Actual Results:  
The build will fail because the i686 machine used gcc instead of sparc-unknown-linux-gnu.  

Expected Results:  
If the emerge line is changed to 
CC=sparc-unknown-linux-gnu emerge <package> 
this will force the use of the full compiler name and the package should now compile because the 
remote machine gets handed the correct compiler name to use. 
 
If the full compiler name was used by portage (in this case sparc-unknown-linux-gnu-gcc instead of 
gcc) then emerge <pakcage> should then work because the remote machine now uses the correct 
compiler with out the user having to know the full compiler name.
Comment 1 Tom Ward 2003-03-26 13:20:30 UTC
Apparently, the correct form is to specify CC=$CHOST-gcc when you give emerge. 
(Yes, it's a little annoying) 
 
Ref: 
 
http://bugs.gentoo.org/show_bug.cgi?id=17237 
and others... 
 
Jesu 
Comment 2 James Boddington (RETIRED) gentoo-dev 2003-03-26 16:54:19 UTC
What I had done was modify my /etc/env.d/gcc/i686-pc-linux-gnu-3.2.2  I put the fully qualified gcc name for CC and CXX. Followed by gcc-config i686-pc-linux-gnu-3.2.2 && . /etc/profile  This way the use of the full name was automatic. Distcc cross  platform now works transparently for me. 
Comment 3 Zach Welch (RETIRED) gentoo-dev 2003-05-22 15:39:20 UTC
I'm stealing this bug because 1) Nick has enough on his plate and 2) this is a bug that can be fixed with the new version of gcc-config I am working on.  I am blocking this bug with that one and I'll add some functionality to address this directly.
Comment 4 Alexander Gabert (RETIRED) gentoo-dev 2003-11-17 06:39:47 UTC
is this a dead bug?
Comment 5 SpanKY gentoo-dev 2004-01-28 23:20:33 UTC
comment #2 covers it all i believe

which leads us to Bug 29558