Talk:Cross-compiling using distcc

From gc-linux

Jump to: navigation, search

Did you actually get this working ... I wrote it as a placeholder ages ago and never got round to correctly building a cross-compiler. --Daniel Thompson 12:27, 3 Dec 2006 (PST)

I thought you already did. You inspired me to build my own. It is in fact the fastest and easiest way to compile "heavy" source code for the cube. Some packages can't be natively compiled and some are a pain to cross-compile because often libraries are indeed linker scripts pointing to other libraries using complete paths. The distcc way of cross-compiling solves automagically all these problems. I should write a step by step howto someday. --isobel 15:48, 3 Dec 2006 (PST)

I reckon I got about three quarters of the way there before other family pressures caught up with me and I ignored it again. I've seen the technique used in the build system of a few other embedded Linux environments but didn't quite finish it. This is more or less the story of all my gc-linux hacking :-( --Daniel Thompson 07:58, 4 Dec 2006 (PST)

It's great to see this page finally taking shape. Is there anyone who fancies writing a small piece on building cross compilers? When I visited the topic I got rather bogged down in compiling exactly the right gcc (to get the C++ ABIs to match). --Daniel Thompson 09:25, 10 Dec 2006 (PST)

Against what? The Debian file system available on the page, the SuperTux file systems, or a uClibc compiler? I'm assuming you probably mean the one of the first two which I believe are glibc. I don't have a whole lot of experience with making a glibc cross compiler besides using crosstool. I could start the page with some info about uClibc (with how to do it manually and also links to build scripts which accomplish the same thing.) What exactly are you wanting and I'll try and help out. --Losinggeneration 12:25, 10 Dec 2006 (PST)
Fair point. Basically my goal is to accelerate compiles where the build system is running on the 'cube (so I don't have to debug any autotool cross compile issues). Shell scripts, makefiles, C preprocessor and linker all run on the cube. This means that the cross compile invoked by distcc must be similar to (or the same) as the normal gcc compiler offered by Debian/PPC (currently gcc-4.1). Strictly speaking this doesn't matter that much for plain C; there are no issues with library ABIs since all the headers come from the 'cube itself and the C language ABI has changed for years. However for C++ the symbol mangling algorithm changes between releases of gcc (the older algos. were buggy and could lead to false symbol clashes). If memory serves this was all sorted out by gcc-3.4 but it pays to be careful here. Basically all I really want to do is to build a (working) 4.1 xcompiler, ideally with glibc but I'm not sure this matters. --Daniel Thompson 08:39, 12 Dec 2006 (PST)
Personal tools