1 |
2016-06-02 20:53 GMT+08:00 Anthony G. Basile <blueness@g.o>: |
2 |
> On 6/2/16 8:48 AM, Lei Zhang wrote: |
3 |
>> 2016-06-02 13:13 GMT+08:00 Anthony G. Basile <blueness@g.o>: |
4 |
>>> On 6/1/16 11:35 PM, Lei Zhang wrote: |
5 |
>>>> |
6 |
>>>> Currently I'm considering introducing a new ABI type "musl" into clang, so |
7 |
>>>> we can build a native clang targeting "x86_64-linux-musl". But I notice |
8 |
>>>> there's also an ABI type specifically for x32, named "gnux32". Then what |
9 |
>>>> about musl on a x32 platform? Should I name it "muslx32" or something? I |
10 |
>>>> don't know why x86 and x86_64 can live with the same ABI name, while x32 |
11 |
>>>> can't... |
12 |
>>> |
13 |
>>> 1) i tried x32 + musl + gcc and ran into quite a few issues and gave up. |
14 |
>>> i don't recall what those issues are right now, but they were basically |
15 |
>>> lost of compile time breakage of packages. since i'm not a big fan of |
16 |
>>> x32 i didn't put a lot of effort in and when i saw it was a steep climb, |
17 |
>>> i had bigger fish to fry. |
18 |
>> |
19 |
>> musl's FAQ says the support for x32 is still experimental; so the unstability |
20 |
>> is kind of expected. |
21 |
>> |
22 |
>>> |
23 |
>>> 2) i don't know what you mean by "should i name it muslx32". what is |
24 |
>>> the "it" in your sentence? |
25 |
>> |
26 |
>> I mean the ABI part in a toolchain triplet. |
27 |
> |
28 |
> there shouldn't be an abi part in the toolchain tuple. i know some have |
29 |
> done so, but its wrong for the reasons i said. a single toolchain is |
30 |
> able to emit multiple abis. which one would you like to put there? |
31 |
> |
32 |
>> |
33 |
>>> if its the the toolchain tuple, that should |
34 |
>>> not contain the abi name in it because a given toolchain is able to emit |
35 |
>>> different abis. for example gcc on x86_64 architecture can produce |
36 |
>>> three abis (if the corresponding libc's are available): gcc -m32, gcc |
37 |
>>> -m64, gcc -mx32 |
38 |
>> |
39 |
>> Taking "x86_64-linux-musl" for example, the "musl" is the ABI name and |
40 |
>> should be in the triplet, right? Otherwise how do we tell which libc |
41 |
>> this toolchain |
42 |
>> is using? |
43 |
> |
44 |
> no, musl is the name of the libc. you are confusing the libc with the |
45 |
> abi. you can have multilib systems with /lib /lib64 /libx32 each with |
46 |
> their own abi version of the libc. |
47 |
|
48 |
The structure of target triplet is really confusing me... Typically a |
49 |
triplet has the form: |
50 |
|
51 |
<arch>-<vendor>-<os> |
52 |
|
53 |
Then what is "musl" or "gnu"s role in this? A part of the <os> field? |
54 |
|
55 |
>> |
56 |
>> enum EnvironmentType { |
57 |
>> UnknownEnvironment, |
58 |
>> |
59 |
>> GNU, |
60 |
>> GNUEABI, |
61 |
>> GNUEABIHF, |
62 |
>> GNUX32, |
63 |
>> CODE16, |
64 |
>> EABI, |
65 |
>> EABIHF, |
66 |
>> Android, |
67 |
>> |
68 |
>> MSVC, |
69 |
>> Itanium, |
70 |
>> Cygnus, |
71 |
>> AMDOpenCL, |
72 |
>> CoreCLR, |
73 |
>> LastEnvironmentType = CoreCLR |
74 |
>> }; |
75 |
>> |
76 |
>> The "Environment" refers to the last part of a triplet. |
77 |
> |
78 |
> i'm not a clang fan. if clang insists that the abi be in the tuple |
79 |
> name, then its doing it wrong. bug upstream clang people and ask wtf |
80 |
> they are up to. |
81 |
|
82 |
But aren't names like "gnueabi" and "gnueabihf" are also used in the GCC world? |
83 |
It looks to me clang is just mimicking gcc's behavior. Or perhaps I'm |
84 |
not getting |
85 |
your point... |
86 |
|
87 |
|
88 |
Lei |