1 Crosscompiling with distcc HOWTO
2 ================================
6 croscompiling of sourcecode in general including NetBSD's source
7 tree and NetBSD's pkgsrc packages using `pkgsrc/devel/distcc'
9 Note that this current setup is not intended for build builds as it might
10 confuse the buildbuild system.
14 1) install `pkgsrc/devel/distcc' package.
16 2) install helper script "use-distcc" in f.e. /usr/local/bin/:
20 setenv PATH "/usr/distcc/bin:$PATH"
24 3) create directory "/usr/distcc/bin" contents with softlinks :
25 lrwxr-xr-x 1 root wheel 20 Sep 16 02:58 c++@ -> ../../pkg/bin/distcc
26 lrwxr-xr-x 1 root wheel 20 Sep 16 02:57 cc@ -> ../../pkg/bin/distcc
27 lrwxr-xr-x 1 root wheel 20 Sep 16 02:58 g++@ -> ../../pkg/bin/distcc
28 lrwxr-xr-x 1 root wheel 20 Sep 16 02:57 gcc@ -> ../../pkg/bin/distcc
33 1) install `pkgsrc/devel/distcc' package.
35 2) create a crosscompiler to compile from any architecture to NetBSD/sparc,
36 go to the NetBSD src dir and run :
37 ./build.sh -a sparc -m sparc -T /usr/gcc-cross-sparc/ tools
39 this will create a directory called /usr/gcc-cross-sparc/ with the
40 crosscompilation tools.
42 3) install helper script "START-distcc'
46 setenv PATH "/usr/gcc-cross-sparc/sparc--netbsdelf/bin/:$PATH"
47 setenv DISTCC_VERBOSE 1
49 distccd -a 192.168.0.137/24 --listen 192.168.0.137 -p 3632
51 this will start the `distcc' daemon to listen on the 192.168.0/24 network
52 and listen on 192.168.0.137 specificly and on port 3632 (why doesn't it do
56 Compilation of sources (not pkgsrc):
57 ------------------------------------
58 1) on each helper machine run the `START-distcc' script
60 2) on the target machine (replace helper1, helper2 etc. by the names/ip
61 addresses of the helper machines) :
63 source /usr/local/bin/use-distcc
64 setenv DISTCC_HOSTS "helper1 helper2 helper3"
70 Compilation of pkgsrc packages:
71 -------------------------------
72 1) on each helper machine run the `START-distcc' script
74 2) on the target machine, do NOT run the `use-distcc' script, go to the
77 set the helpers (,lzo addition sets compression of the data transport):
78 setenv DISTCC_HOSTS "helper1 helper2 helper3,lzo"
80 instruct pkgsrc to use distcc:
81 setenv PKGSRC_COMPILER "distcc gcc"
83 set the concurrency level (not all packages allow this)
84 setenv BUILD_MAKE_FLAGS "-j2"
86 compile/update package