[distcc] distcc with QNX
Steve Whitard-Swift
Steve.Whitard-Swift at eads.com
Wed Jul 12 08:43:26 GMT 2006
We have distcc working with QNX 6.3.0 - the QNX cross-compiler 'qcc'
is more-or-less identical to gcc.
The main complication with QNX is its recursive makefile structure:
In order to use distcc you must edit c:/QNX630/target/qnx6/usr/include/qconfig.mk in
which 'make' variables are set up to invoke the various target-dependent compiler
derivatives. For example:
CC_nto_x86_gcc_qcc = $(QNX_HOST)/usr/bin/qcc -V$(gcc_ver_string)gcc_ntox86 -c
AS_nto_x86_gcc_qcc = $(QNX_HOST)/usr/bin/qcc -V$(gcc_ver_string)gcc_ntox86 -c
LR_nto_x86_gcc_qcc = $(QNX_HOST)/usr/bin/qcc -V$(gcc_ver_string)gcc_ntox86 -r
LD_nto_x86_gcc_qcc = $(QNX_HOST)/usr/bin/qcc -V$(gcc_ver_string)gcc_ntox86
AR_nto_x86_gcc_qcc = $(AR_nto_x86_gcc)
UM_nto_x86_gcc_qcc = $(UM_nto_x86_gcc)
LDBOOTSTRAP_nto_x86_gcc_qcc = $(LDBOOTSTRAP_nto_x86_gcc)
LDBOOTSTRAPPOST_nto_x86_gcc_qcc = $(LDBOOTSTRAPPOST_nto_x86_gcc)
must become:
CC_nto_x86_gcc_qcc = distcc qcc -V$(gcc_ver_string)gcc_ntox86 -c
AS_nto_x86_gcc_qcc = distcc qcc -V$(gcc_ver_string)gcc_ntox86 -c
LR_nto_x86_gcc_qcc = distcc qcc -V$(gcc_ver_string)gcc_ntox86 -r
LD_nto_x86_gcc_qcc = distcc qcc -V$(gcc_ver_string)gcc_ntox86
AR_nto_x86_gcc_qcc = $(AR_nto_x86_gcc)
UM_nto_x86_gcc_qcc = $(UM_nto_x86_gcc)
LDBOOTSTRAP_nto_x86_gcc_qcc = $(LDBOOTSTRAP_nto_x86_gcc)
LDBOOTSTRAPPOST_nto_x86_gcc_qcc = $(LDBOOTSTRAPPOST_nto_x86_gcc)
Then ensure that the PATH environment variable has c:/QNX630/host/win32/x86/usr/bin
early in its list. (N.B. QNX_HOST is set to c:/QNX630/host/win32/x86 on our
QNX distribution)
This works both from Momentics and a bash shell
In order to gain control of the 'make' -j option which QNX normally defaults to 1,
try 'make JLEVEL=2 CPULIST=<your target> ....' or add an equivalent build target to
Momentics.
Choosing '-j N' or JLEVEL=N where N is greater than the number of volunteer
hosts, we have found that distcc will occasionally cough out error message:
'cc: mkdir: cannot create temporary working directory'
'distcc[2024] ERROR: compile c:/tom/dick/harry.cpp failed'
Other than that, it seems to work as advertised. One is impressed.
Steven Whittard-Swift, EADS DS UK Ltd.
More information about the distcc
mailing list