Gentoo Archives: gentoo-hardened

From: Jonathan Skanes <jon@××××××.ca>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] [solved] was: distcc and mixed hardened/vanilla toolchains
Date: Thu, 01 Jun 2006 04:38:04
Message-Id: 200606010204.32720.jon@skanes.ca
In Reply to: Re: [gentoo-hardened] distcc and mixed hardened/vanilla toolchains by "Kevin F. Quinn"
1 Hi Everyone,
2
3 I've modified the stock distccd init.d and conf.d scripts to launch vanilla
4 and hardened gcc profiles on different ports. In my example, vanilla runs on
5 the standard port and hardened runs on standard port +1. The config script
6 should be self explanatory.
7
8 On the hardened clients the distcc hosts file would look like this:
9
10 host1:3633 host2:3633 [...]
11
12 The gcc profile set with gcc-config, in the environment the distccd init
13 script is started in, will be used.
14
15 Jon
16
17 On Sunday 28 May 2006 06:22, Kevin F. Quinn wrote:
18 > On Sun, 28 May 2006 01:54:22 -0230
19 >
20 > Jonathan Skanes <jon@××××××.ca> wrote:
21 > > On May 22, 2006 16:31, Kevin F. Quinn wrote:
22 > > > > If so, do i change the gcc profile on the
23 > > > > hardened machines to vanilla before emerging?
24 > > >
25 > > > That's the only way that will work with distcc. Another option
26 > > > would have been to add '-specs=vanilla.specs' to CFLAGS, but distcc
27 > > > will reject it (it's a bit tricky to support).
28 > >
29 > > OK, this being so, can I have the discc init.d script select a
30 > > profile and update the environment before running distcc and have it
31 > > retain the changes? If so, it should be possible to run a couple
32 > > distcc invocations on different ports to support the different
33 > > profiles. This would be fabulous as then I can configure the distcc
34 > > client to choose the right spec based on distcc port number.
35 >
36 > Should be simple enough. The only environment thing that matters
37 > however is the environment variable GCC_SPECS so you don't need to go
38 > switching the system profile all the time.
39 >
40 > I suggest copying the distccd init.d and conf.d scripts to (say)
41 > distccdh. Set the port number in conf.d/distccdh and set GCC_SPECS in
42 > init.d/distccdh; probably best to add a line 'export
43 > GCC_SPECS="hardened.specs"' before distccd is run. Then just start
44 > distccdh.

Attachments

File name MIME type
distccd text/plain
distccd text/plain