Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Crosscompiling with distcc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lurid
Guru
Guru


Joined: 12 Mar 2003
Posts: 595
Location: Florida

PostPosted: Sun Jan 25, 2004 6:47 pm    Post subject: Crosscompiling with distcc? Reply with quote

Ok, heres my situation. I had two AMD Athlons (mine and my girlfriends) and I used distcc to compile everything between the two. I'd use both machines to compile on my computer and build packages, then install them with emerge -k on her machine. Well, recently I was just handed a P4 2.4 ghz (d00t!) and I dig it, but now my girlfriend has to compile all her all own stuff, which is no big deal, but definatly not as convient as it once was.

So. In the distcc guide there is a brief section on crosscompiling, but nothing really in depth. Is this possible on Gentoo or no? Do I need to install a different gcc, or install it in a special way that'll make it be able to crosscompile? I know I won't be able to just build packages for her anymore, but if she can use distcc the things she does compile will go much faster. And I wouldn't mine adding an extra ghz to my compiles either. ;)
_________________
Go find a cheerleader and saw her legs off. - Nny
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Wed Jan 28, 2004 12:55 pm    Post subject: Reply with quote

You might run
Code:
CFLAGS="<what your gf needs>" emerge -B <arbitrary packages>
, which will produce binary packages for your gf.

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
lurid
Guru
Guru


Joined: 12 Mar 2003
Posts: 595
Location: Florida

PostPosted: Wed Jan 28, 2004 5:00 pm    Post subject: Reply with quote

You can't compile something -march=athlon-xp on a P4, can you? Or can you compile it, just not run it on a P4? Also does distcc export CFLAGS? If my machine (p4) is compiling code that distcc sent it from my girlfriends machine (athlon), whos CFLAGS get used?

Besides which, compiling packages for her on my machine is redundant now. I did that before because I had an Athlon too, so when I compiled for me, I could easily just pop the packages on her machine. Now they have to be compiled seperatly because of the arch difference. I just want to use distcc so her compiles aren't as time consuming (since shes used to a weekly emerge -u world taking about 5 minutes ;)
_________________
Go find a cheerleader and saw her legs off. - Nny
Back to top
View user's profile Send private message
Nebvin
Tux's lil' helper
Tux's lil' helper


Joined: 10 Oct 2002
Posts: 83
Location: Alberta, Canada

PostPosted: Wed Jan 28, 2004 8:06 pm    Post subject: Reply with quote

you wont have to worry, distcc will send the proper cflags and everything to the distcc host. I use distcc with a mixture of intel and amd processors and it works.
_________________
Nebbie
"There are 10 types of people in the world, those that understand binary and those that don't."
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Thu Jan 29, 2004 9:14 am    Post subject: Reply with quote

I think that you can -- compiling the package (and creating a binary tbz2 ONLY) should definitely work. What might happen is that the tests many packages compile and run may fail; but I'm not sure about that. You possibly can toggle this behaviour with configure, but since emerge does that on your behalf, it might be tricky.

Did you look on the forums for cross-compilation howtos?

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
lurid
Guru
Guru


Joined: 12 Mar 2003
Posts: 595
Location: Florida

PostPosted: Thu Jan 29, 2004 6:19 pm    Post subject: Reply with quote

Well, all the stuff I've found is for real crosscompiling, like with a ppc or sparc. ;) I guess CFLAGS are the only thing thats really holding this all back. I'd hate to just compile for i686, but that'd work on both machines.
_________________
Go find a cheerleader and saw her legs off. - Nny
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Thu Jan 29, 2004 6:58 pm    Post subject: Reply with quote

OTOH, you could use CFLAGS which are compatible for both boxes 8O <ducks>...

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
Auka
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jul 2002
Posts: 110
Location: Germany

PostPosted: Tue Feb 24, 2004 8:17 pm    Post subject: Reply with quote

This will work just fine - regardles of your CFLAGS and without anything to worry except for having the same comiler versions on all machines.

I've had various machines mixed in my distcc environment so far: Athlon XP, Pentium II, Pentium III and IV, AMD K6-II...the only thing that I didn't try jet (but soon will) is adding my Sparc to that list. :wink:
distcc rules. :P
Back to top
View user's profile Send private message
bakkus
n00b
n00b


Joined: 17 Dec 2002
Posts: 33

PostPosted: Tue Jun 01, 2004 10:24 pm    Post subject: Reply with quote

Both your AMD and P¤ are i686 CPUs.
Even more important, they're still both based on the ix86 architecture.
Crosscompiling is only for compiling between different architectures, such as compiling SPARC stuff on an x86.
Don't worry, your AMD will generate perfect P4 code, and vice versa. DistCC also takes care of all the flag settings according to what is needed for the target machine, so don't worry about it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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