1 |
2016-06-02 13:13 GMT+08:00 Anthony G. Basile <blueness@g.o>: |
2 |
> On 6/1/16 11:35 PM, Lei Zhang wrote: |
3 |
>> |
4 |
>> Currently I'm considering introducing a new ABI type "musl" into clang, so |
5 |
>> we can build a native clang targeting "x86_64-linux-musl". But I notice |
6 |
>> there's also an ABI type specifically for x32, named "gnux32". Then what |
7 |
>> about musl on a x32 platform? Should I name it "muslx32" or something? I |
8 |
>> don't know why x86 and x86_64 can live with the same ABI name, while x32 |
9 |
>> can't... |
10 |
> |
11 |
> 1) i tried x32 + musl + gcc and ran into quite a few issues and gave up. |
12 |
> i don't recall what those issues are right now, but they were basically |
13 |
> lost of compile time breakage of packages. since i'm not a big fan of |
14 |
> x32 i didn't put a lot of effort in and when i saw it was a steep climb, |
15 |
> i had bigger fish to fry. |
16 |
|
17 |
musl's FAQ says the support for x32 is still experimental; so the unstability |
18 |
is kind of expected. |
19 |
|
20 |
> |
21 |
> 2) i don't know what you mean by "should i name it muslx32". what is |
22 |
> the "it" in your sentence? |
23 |
|
24 |
I mean the ABI part in a toolchain triplet. |
25 |
|
26 |
> if its the the toolchain tuple, that should |
27 |
> not contain the abi name in it because a given toolchain is able to emit |
28 |
> different abis. for example gcc on x86_64 architecture can produce |
29 |
> three abis (if the corresponding libc's are available): gcc -m32, gcc |
30 |
> -m64, gcc -mx32 |
31 |
|
32 |
Taking "x86_64-linux-musl" for example, the "musl" is the ABI name and |
33 |
should be in the triplet, right? Otherwise how do we tell which libc |
34 |
this toolchain |
35 |
is using? |
36 |
|
37 |
You're right a "x86_64-linux-gnu" toolchain should be able to able to produce |
38 |
x86, x86_64 and x32 executables. That's why I'm confused when seeing |
39 |
"gnux32" as a separate ABI name. This is a code snippet from clang: |
40 |
|
41 |
enum EnvironmentType { |
42 |
UnknownEnvironment, |
43 |
|
44 |
GNU, |
45 |
GNUEABI, |
46 |
GNUEABIHF, |
47 |
GNUX32, |
48 |
CODE16, |
49 |
EABI, |
50 |
EABIHF, |
51 |
Android, |
52 |
|
53 |
MSVC, |
54 |
Itanium, |
55 |
Cygnus, |
56 |
AMDOpenCL, |
57 |
CoreCLR, |
58 |
LastEnvironmentType = CoreCLR |
59 |
}; |
60 |
|
61 |
The "Environment" refers to the last part of a triplet. |
62 |
|
63 |
|
64 |
Lei |