Gentoo Archives: gentoo-mips

From: Joshua Kinard <kumba@g.o>
To: "Michał Górny" <mgorny@g.o>, gentoo-dev@l.g.o
Cc: mips@g.o, gentoo-mips@l.g.o
Subject: [gentoo-mips] Re: [gentoo-dev] Monthly mips@ project status for April 2018
Date: Mon, 02 Apr 2018 17:28:12
In Reply to: [gentoo-mips] Re: [gentoo-dev] Monthly mips@ project status for April 2018 by "Michał Górny"
1 On 4/2/2018 5:41 AM, Michał Górny wrote:
2 > W dniu nie, 01.04.2018 o godzinie 20∶40 -0700, użytkownik Matt Turner
3 > napisał:
4 >
5 >> My plan is to add stable 17.0 mips profiles when the keywording is
6 >> sorted out and kill two birds with one stone.
7 >
8 > Does it involve fixing the CHOST inconsistency so that we can finally
9 > get LLVM keyworded?
11 Bug #515694, right? Based on a very quick re-read, there are two
12 issues/blockers here:
14 1) Current Gentoo/MIPS support was originally based on gcc, thus, we've used
15 CHOST tuples that are recognized by gcc.
17 2) clang lacks a CHOST tuple that defaults to n32. n32 is the "ideal" ABI for
18 a 64-bit platform that doesn't need full 64bit (n64) binary support.
20 As far as I can tell, we need to fix #2 before we can do anything about #1.
21 Once clang has a discrete CHOST tuple for n32, that'll put it on parity with
22 gcc, which itself appears to have a batch of more specific tuples to select
23 different ABIs. You might want to just push upstream any patches you have that
24 adds this support first.
26 ---
28 Having been around in the Very Beginning, I can tell you that one doesn't
29 change CHOSTs lightly on MIPS. There are a LOT of upstream projects that don't
30 use newer autotools and thus won't recognize the more specific CHOSTs. And
31 there are a few projects, like Perl, that use their own custom build system and
32 might need special fixes on top to use the more-specific tuples.
34 That said, none of this addresses the issue of the multiple C library options
35 available. As far as I know, using different ABIs with uclibc-ng or musl
36 requires setting either a build or config option, or passing -mabi=xxx, along
37 with a gcc-like CHOST tuple. E.g., for my uclibc-ng chroot on my Octane, I am
38 sticking w/ o32 and thus use a CHOST of mips-unknown-linux-uclibc. If
39 clang/llvm can co-exist with C libraries other than glibc, this is likely an
40 additional complexity to consider.
42 Also, last I checked, clang/llvm didn't have full support for the "old" MIPS
43 ISAs, namely mips3 and only part of mips4. It also has no knowledge of
44 scheduling for the old CPU families, like R10K. I helped write the current
45 R10K scheduling code for gcc a few years ago, so maybe could do something for
46 clang/llvm, though I have no idea how they implement CPU scheduling logic.
48 --
49 Joshua Kinard
50 Gentoo/MIPS
51 kumba@g.o
52 6144R/F5C6C943 2015-04-27
53 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
55 "The past tempts us, the present confuses us, the future frightens us. And our
56 lives slip away, moment by moment, lost in that vast, terrible in-between."
58 --Emperor Turhan, Centauri Republic