Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: changing CHOST in stage3 (was : [gentoo-user] default stage3)
Date: Wed, 23 Nov 2005 00:57:24
Message-Id: 7573e9640511221652i70df6190pe98d444430fad2d4@mail.gmail.com
In Reply to: Re: changing CHOST in stage3 (was : [gentoo-user] default stage3) by Matthias Langer
1 On 11/22/05, Matthias Langer <mlangc@×××.at> wrote:
2 > On Tue, 2005-11-22 at 17:11 -0500, Matthew Cline wrote:
3 > > On 11/22/05, Alexander Skwar <listen@×××××××××××××××.name> wrote:
4 > > >
5 > > > Why? What do you expect to gain?
6 > > >
7 > >
8 > > The computer I am installing this on is an old Compaq laptop with a
9 > > Cyrix MediaGX processor. Everything I have read suggests that this is
10 > > equivalent to an i586.
11 > >
12 > > Am I wrong in thinking that the CHOST variable should reflect the kind
13 > > of processor in the machine? Wouldn't leaving the CHOST at
14 > > "i386-pc-linux-gnu" build unoptimized binaries?
15 > >
16 > >
17 > > Matt
18 > >
19 >
20 > I'm not an expert, but this is just copied and pasted from the gentoo
21 > handbook:
22 >
23 > The CHOST variable declares the target build host for your system. This
24 > variable should already be set to the correct value. Do not edit it as
25 > that might break your system. If the CHOST variable does not look
26 > correct to you, you might be using the wrong stage3 tarball.
27 >
28 > Cheers, Matthias
29
30 AFAICT, CHOST is (mostly) used by portage for the "--host" argument to
31 the autoconf scripts, which in turn uses it to determine the path for
32 the tool chain. So having CHOST=i386-blah-blah means you are using
33 the tool chain /usr/bin/i386-blah-blah-*.
34
35 This is also the _default_ host that gcc will build code for. So
36 without any -march/-mcpu/-mtune settings in CFLAGS, you will get i386
37 code. However, you can override that in CFLAGS, so that gcc produces
38 i586 code by default (if that is what you want).
39
40 AFAIK, there should be no difference in code produced by
41 "i586-pc-linux-gnu-gcc" and "i386-pc-linux-gnu-gcc -march=i586". If
42 there is, then things like distcc should be horribly broken.
43
44 -Richard
45
46 --
47 gentoo-user@g.o mailing list

Replies

Subject Author
Re: changing CHOST in stage3 (was : [gentoo-user] default stage3) Richard Fish <bigfish@××××××××××.org>