Gentoo Archives: gentoo-mips

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-mips@l.g.o
Subject: Re: [gentoo-mips] Re: On MIPS using the same CHOST for all multilib ABIs
Date: Sun, 29 Dec 2013 23:46:42
Message-Id: 52C0B497.60807@gentoo.org
In Reply to: Re: [gentoo-mips] Re: On MIPS using the same CHOST for all multilib ABIs by Markos Chandras
1 On 12/29/2013 05:33 PM, Markos Chandras wrote:
2 > On 12/29/2013 10:19 PM, Anthony G. Basile wrote:
3 >> On 12/29/2013 05:13 PM, Markos Chandras wrote:
4 >>> On 12/29/2013 09:52 PM, Anthony G. Basile wrote:
5 >>>> On 12/29/2013 04:48 PM, Markos Chandras wrote:
6 >>>>> On 12/29/2013 09:48 PM, Michał Górny wrote:
7 >>>>>> Dnia 2013-12-29, o godz. 16:40:08
8 >>>>>> Joshua Kinard <kumba@g.o> napisał(a):
9 >>>>>>
10 >>>>>>> On 12/28/2013 5:58 PM, Michał Górny wrote:
11 >>>>>>>> I've noticed today that mips uses the same CHOST value for all three
12 >>>>>>>> ABIs it supports:
13 >>>>>>>>
14 >>>>>>>> arch/mips/mips64/multilib/make.defaults:CHOST_o32="${CHOST}"
15 >>>>>>>> arch/mips/mips64/multilib/make.defaults:CHOST_n32=${CHOST}
16 >>>>>>>> arch/mips/mips64/multilib/make.defaults:CHOST_n64=${CHOST}
17 >>>>>>>> arch/mips/mipsel/mips64el/multilib/make.defaults:CHOST_o32="${CHOST}"
18 >>>>>>>>
19 >>>>>>>> arch/mips/mipsel/mips64el/multilib/make.defaults:CHOST_n32="${CHOST}"
20 >>>>>>>>
21 >>>>>>>> arch/mips/mipsel/mips64el/multilib/make.defaults:CHOST_n64="${CHOST}"
22 >>>>>>>>
23 >>>>>>>>
24 >>>>>>>> [...]
25 >>>>>>> Matt can probably vouch for this better, but the only two ABIs
26 >>>>>>> affected by
27 >>>>>>> this are n32 and n64. mips[el]-unknown-linux-gnu implies a 32-bit
28 >>>>>>> big/little endian CHOST, which means the o32 ABI.
29 >>>>>>> mips64[el]-unknown-linux-gnu means either n32 or n64. So no change
30 >>>>>>> should
31 >>>>>>> be needed for o32-based installs.
32 >>>>>> Just to be clear:
33 >>>>>>
34 >>>>>> profiles/arch/mips/mipsel/mips64el/multilib/make.defaults:
35 >>>>>>
36 >>>>>> CHOST="mips64el-unknown-linux-gnu"
37 >>>>>>
38 >>>>>> [...]
39 >>>>>>
40 >>>>>> CFLAGS_o32="-mabi=32"
41 >>>>>> CHOST_o32="${CHOST}"
42 >>>>>>
43 >>>>>> CFLAGS_n32="-mabi=n32"
44 >>>>>> CHOST_n32="${CHOST}"
45 >>>>>>
46 >>>>>> CFLAGS_n64="-mabi=64"
47 >>>>>> CHOST_n64="${CHOST}"
48 >>>>>>
49 >>>>>> So in this case, o32 actually uses mips64el-unknown-linux-gnu, unless
50 >>>>>> I'm missing something.
51 >>>>>>
52 >>>>> Yes all 3 ABIs use the same tuple.
53 >>>>>
54 >>>> I think people are missing Mike's point from earlier, which is that
55 >>>> tuples label toolchains and a toolchain can support multiple abis. So
56 >>>> for example, what would one do on a system which simultaneously has o32,
57 >>>> n32 and n64? -gnuabi32n32n64 looks pretty crazy.
58 >>>>
59 >>> There is only one default ABI, so the toolchain should be named after
60 >>> that. But that does not mean the toolchain can't build for different ABIs
61 >>>
62 >> No because that would confuse a toolchain which only supports n32 with
63 >> one that supports o32/n32/n64.
64 > Ah fair point
65 >
66 > Anyhow, Michał response is heading in
67 >> the right direction where we'd have to use multiple tuple on multilib
68 >> system support more than one lib. I'm still not sure where this will
69 >> land us with respect to gnuconfig and other tuple parsing tools that
70 >> bring in their own assumptions.
71 >>
72 > I would guess that if debian is using the -gnuabin32/64 suffix and it
73 > works for them, then such tools would already understand such tuples.
74 >
75 Or their maintaining lots-o-patches which is what starts to happen when
76 you deviate from standards. Anyhow, we should talk to them and see.
77
78 --
79 Anthony G. Basile, Ph.D.
80 Gentoo Linux Developer [Hardened]
81 E-Mail : blueness@g.o
82 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
83 GnuPG ID : F52D4BBA