Gentoo Archives: gentoo-dev

From: Alexandre Rostovtsev <tetromino@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: crossdev and multilib interference
Date: Thu, 27 Mar 2014 04:42:50
Message-Id: 1395895307.23327.25.camel@rook
In Reply to: Re: [gentoo-dev] Re: crossdev and multilib interference by Mike Frysinger
1 On Wed, 2014-03-26 at 22:41 -0400, Mike Frysinger wrote:
2 > On Wed 26 Mar 2014 12:23:53 Ian Stakenvicius wrote:
3 > > On 26/03/14 12:12 PM, Mike Frysinger wrote:
4 > > > that's bs. people install crossdev to get a cross-compile
5 > > > environment, not to get something that only works through `emerge`.
6 > > > attempting to restrict it so it only works through `emerge` is
7 > > > unacceptable and it has never been that way.
8 > >
9 > > it -does- make sense though to limit anything that one wants to EMERGE
10 > > with the crossdev, to require the use of cross-emerge. Would it not
11 > > be possible to somehow ensure the crossdev tools are ignored
12 > > in/removed from/cannot pollute the standard emerge environment? Are
13 > > there any use cases where one -would- want the crossdev to be used in
14 > > a standard emerge environment instead of using cross-emerge ?
15 >
16 > you've lost me. when you `emerge-$CTARGET`, that package doesn't go anywhere
17 > near your ROOT=/ system. it's entirely contained in /usr/$CTARGET/.
18 >
19 > when you run `crossdev $CTARGET`, it installs all the standard $CTARGET-xxx
20 > tools in /usr/bin. this isn't "polluting" the environment at all ... in fact,
21 > they're living right alongside existing tools.
22 >
23 > as i pointed out elsewhere in this thread, the problem is that multilib relies
24 > on automatic detection of the toolchain *failing* so that it falls back to the
25 > native value. in other words, when you run `./configure --host=i686-pc-linux-
26 > gnu`, it tries to find e.g. i686-pc-linux-gnu-ar. it doesn't exist so the
27 > fallback is used (plain `ar`). multilib is using these tuples so that the
28 > standard checks (autoconf/eclasses/etc...) trigger in the right ways for the
29 > cpu/os/userland combinations.
30 >
31 > since crossdev installs a full proper toolchain for the target, the one
32 > multilib was using to lie now exists and its toolchain is used instead.
33 > -mike
34
35 Crossdev is "polluting the environment" in the specific case that we are
36 talking about - secondary native ABIs on a multilib system.
37
38 An amd64 multilib system is not expected to build MIPS binaries that
39 would be hosted on itself. So of course anyone using amd64 undersands
40 that mips-pc-linux-gnu-ar is part of a cross-compile toolchain, no
41 matter whether it's in /usr/bin or /usr/libexec/crossdev or anywhere in
42 the filesystem.
43
44 However, an i686 crossdev on an amd64 multilib system is a fundamentally
45 different situation. An amd64 multilib system *is* expected to build x86
46 binaries that would be hosted on itself. So i686-pc-linux-gnu-ar is
47 expected to be not a part of any cross-compile toolchain, but a part of
48 the native toolchain for the machine's secondary native ABI. Especially
49 when i686-pc-linux-gnu-ar is in /usr/bin.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: crossdev and multilib interference Mike Frysinger <vapier@g.o>