Gentoo Archives: gentoo-musl

From: "Anthony G. Basile" <blueness@g.o>
To: Lei Zhang <zhanglei.april@×××××.com>
Cc: gentoo-musl@l.g.o
Subject: Re: [gentoo-musl] [GSoC] musl and x32
Date: Thu, 02 Jun 2016 12:54:01
Message-Id: b098e891-9d20-105e-1323-995f55fbfd6c@gentoo.org
In Reply to: Re: [gentoo-musl] [GSoC] musl and x32 by Lei Zhang
1 On 6/2/16 8:48 AM, Lei Zhang wrote:
2 > 2016-06-02 13:13 GMT+08:00 Anthony G. Basile <blueness@g.o>:
3 >> On 6/1/16 11:35 PM, Lei Zhang wrote:
4 >>>
5 >>> Currently I'm considering introducing a new ABI type "musl" into clang, so
6 >>> we can build a native clang targeting "x86_64-linux-musl". But I notice
7 >>> there's also an ABI type specifically for x32, named "gnux32". Then what
8 >>> about musl on a x32 platform? Should I name it "muslx32" or something? I
9 >>> don't know why x86 and x86_64 can live with the same ABI name, while x32
10 >>> can't...
11 >>
12 >> 1) i tried x32 + musl + gcc and ran into quite a few issues and gave up.
13 >> i don't recall what those issues are right now, but they were basically
14 >> lost of compile time breakage of packages. since i'm not a big fan of
15 >> x32 i didn't put a lot of effort in and when i saw it was a steep climb,
16 >> i had bigger fish to fry.
17 >
18 > musl's FAQ says the support for x32 is still experimental; so the unstability
19 > is kind of expected.
20 >
21 >>
22 >> 2) i don't know what you mean by "should i name it muslx32". what is
23 >> the "it" in your sentence?
24 >
25 > I mean the ABI part in a toolchain triplet.
26
27 there shouldn't be an abi part in the toolchain tuple. i know some have
28 done so, but its wrong for the reasons i said. a single toolchain is
29 able to emit multiple abis. which one would you like to put there?
30
31 >
32 >> if its the the toolchain tuple, that should
33 >> not contain the abi name in it because a given toolchain is able to emit
34 >> different abis. for example gcc on x86_64 architecture can produce
35 >> three abis (if the corresponding libc's are available): gcc -m32, gcc
36 >> -m64, gcc -mx32
37 >
38 > Taking "x86_64-linux-musl" for example, the "musl" is the ABI name and
39 > should be in the triplet, right? Otherwise how do we tell which libc
40 > this toolchain
41 > is using?
42
43 no, musl is the name of the libc. you are confusing the libc with the
44 abi. you can have multilib systems with /lib /lib64 /libx32 each with
45 their own abi version of the libc.
46
47 >
48 > You're right a "x86_64-linux-gnu" toolchain should be able to able to produce
49 > x86, x86_64 and x32 executables. That's why I'm confused when seeing
50 > "gnux32" as a separate ABI name. This is a code snippet from clang:
51
52 they should not be doing that. that some people do is because they're
53 not thinking. later on, when we have to update gnuconfig upstream, you
54 hit a problem. take a look at how if-crazy config.sub and config.guess
55 are, especially the later. i don't want to add the the craziness.
56
57 >
58 > enum EnvironmentType {
59 > UnknownEnvironment,
60 >
61 > GNU,
62 > GNUEABI,
63 > GNUEABIHF,
64 > GNUX32,
65 > CODE16,
66 > EABI,
67 > EABIHF,
68 > Android,
69 >
70 > MSVC,
71 > Itanium,
72 > Cygnus,
73 > AMDOpenCL,
74 > CoreCLR,
75 > LastEnvironmentType = CoreCLR
76 > };
77 >
78 > The "Environment" refers to the last part of a triplet.
79
80 i'm not a clang fan. if clang insists that the abi be in the tuple
81 name, then its doing it wrong. bug upstream clang people and ask wtf
82 they are up to.
83
84 >
85 >
86 > Lei
87 >
88
89
90 --
91 Anthony G. Basile, Ph.D.
92 Gentoo Linux Developer [Hardened]
93 E-Mail : blueness@g.o
94 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
95 GnuPG ID : F52D4BBA

Replies

Subject Author
Re: [gentoo-musl] [GSoC] musl and x32 Lei Zhang <zhanglei.april@×××××.com>