On Mon, 27 Jun 2011, Audio Phile wrote:

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

That was a typeo.  The real script is correct.

Okay.


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?

I don't think so, but it depends. Without considering SSH-based or other solutions, each PC in a distcc cluster on which you want to run compilation jobs has to have the ability to target the platform for which you're trying to compile.

It might be possible to set it up such that even configuration-related compilation takes place remotely (or there might even be very little of that in a kernel build). The only example where I could see this being beneficial is if you have a set of underpowered workstations and want to offload all compilation to a vastly bigger central box.

Otherwise, if you want to spread the compilation around to all computers in the cluster, you should run a distcc daemon on each. And every PC running the daemon needs to have the chroot environment.


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.

From the help text in those comments, it sounds like you actually want:

$ make -j8 ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu- bzImage

The discussion of 'prefixed executables' is why we previously set up all those symlinks.

--
Best,
Ben
__
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc

Reply via email to