[distcc] compiling with distcc on x86_64 from within a 32-bit chroot?

Audio Phile da_audiophile at yahoo.com
Mon Jun 27 16:30:52 MDT 2011

> Too many double-quotes there?  It should end with
> (quotes included): $0 "$@"

That was a typeo.  The real script is correct.

If I understand everything you wrote, I only need a 32-bit chroot on one of my boxes (the daemon)?  All the server PCs in my distcc cluster can have their native x86_64 gcc's?

Am I right?

Was was intrigued by your statement about cross compiling with make 3.82 and had a look in the linux kernel's Makefile and I found the following:

# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.

# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# A third alternative is to store a setting in .config so that plain
# "make" in the configured kernel build directory always uses that.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

So as I read that, I can use your script and symlinks to my chroot root on my native x86_64 environment as you showed me with the hello.c example by doing:

$ export ARCH=x86
$ make -j8 bzImage CC=i686-pc-linux-gnu-gcc

Do I have this right?  I posted the entire Makefile to pastebin if you need to see more in it.

Thanks again for the great info and for putting up with a newbie!


More information about the distcc mailing list