1 |
On Thu 27 Mar 2014 00:41:47 Alexandre Rostovtsev wrote: |
2 |
> On Wed, 2014-03-26 at 22:41 -0400, Mike Frysinger wrote: |
3 |
> > On Wed 26 Mar 2014 12:23:53 Ian Stakenvicius wrote: |
4 |
> > > On 26/03/14 12:12 PM, Mike Frysinger wrote: |
5 |
> > > > that's bs. people install crossdev to get a cross-compile |
6 |
> > > > environment, not to get something that only works through `emerge`. |
7 |
> > > > attempting to restrict it so it only works through `emerge` is |
8 |
> > > > unacceptable and it has never been that way. |
9 |
> > > |
10 |
> > > it -does- make sense though to limit anything that one wants to EMERGE |
11 |
> > > with the crossdev, to require the use of cross-emerge. Would it not |
12 |
> > > be possible to somehow ensure the crossdev tools are ignored |
13 |
> > > in/removed from/cannot pollute the standard emerge environment? Are |
14 |
> > > there any use cases where one -would- want the crossdev to be used in |
15 |
> > > a standard emerge environment instead of using cross-emerge ? |
16 |
> > |
17 |
> > you've lost me. when you `emerge-$CTARGET`, that package doesn't go |
18 |
> > anywhere near your ROOT=/ system. it's entirely contained in |
19 |
> > /usr/$CTARGET/. |
20 |
> > |
21 |
> > when you run `crossdev $CTARGET`, it installs all the standard |
22 |
> > $CTARGET-xxx |
23 |
> > tools in /usr/bin. this isn't "polluting" the environment at all ... in |
24 |
> > fact, they're living right alongside existing tools. |
25 |
> > |
26 |
> > as i pointed out elsewhere in this thread, the problem is that multilib |
27 |
> > relies on automatic detection of the toolchain *failing* so that it falls |
28 |
> > back to the native value. in other words, when you run `./configure |
29 |
> > --host=i686-pc-linux- gnu`, it tries to find e.g. i686-pc-linux-gnu-ar. |
30 |
> > it doesn't exist so the fallback is used (plain `ar`). multilib is using |
31 |
> > these tuples so that the standard checks (autoconf/eclasses/etc...) |
32 |
> > trigger in the right ways for the cpu/os/userland combinations. |
33 |
> > |
34 |
> > since crossdev installs a full proper toolchain for the target, the one |
35 |
> > multilib was using to lie now exists and its toolchain is used instead. |
36 |
> |
37 |
> Crossdev is "polluting the environment" in the specific case that we are |
38 |
> talking about - secondary native ABIs on a multilib system. |
39 |
> |
40 |
> An amd64 multilib system is not expected to build MIPS binaries that |
41 |
> would be hosted on itself. So of course anyone using amd64 undersands |
42 |
> that mips-pc-linux-gnu-ar is part of a cross-compile toolchain, no |
43 |
> matter whether it's in /usr/bin or /usr/libexec/crossdev or anywhere in |
44 |
> the filesystem. |
45 |
> |
46 |
> However, an i686 crossdev on an amd64 multilib system is a fundamentally |
47 |
> different situation. |
48 |
|
49 |
no, it is not |
50 |
|
51 |
> An amd64 multilib system *is* expected to build x86 |
52 |
> binaries that would be hosted on itself. So i686-pc-linux-gnu-ar is |
53 |
> expected to be not a part of any cross-compile toolchain, but a part of |
54 |
> the native toolchain for the machine's secondary native ABI. Especially |
55 |
> when i686-pc-linux-gnu-ar is in /usr/bin. |
56 |
|
57 |
sure, and it works just fine when you use the correct toolchain. if the user |
58 |
wants to build an ABI using their default toolchain, they can pass the right |
59 |
ABI flag for it. |
60 |
|
61 |
but that's irrelevant to how our multilib implementation picks its fake |
62 |
CHOST_$ABI to take care of implementing things. if anything, the current |
63 |
system is provably broken because the default ends up executing unqualified |
64 |
`ar` and `ranlib` friends. |
65 |
-mike |