From: Joshua Kinard <kumba@gentoo.org>
To: "Michał Górny" <mgorny@gentoo.org>, gentoo-dev@lists.gentoo.org
Cc: mips@gentoo.org, gentoo-mips@lists.gentoo.org
Subject: [gentoo-mips] Re: [gentoo-dev] Monthly mips@ project status for April 2018
Date: Tue, 3 Apr 2018 01:23:54 -0400 [thread overview]
Message-ID: <c309f4c9-7f34-0574-8259-13d7aa881bb9@gentoo.org> (raw)
In-Reply-To: <1522701148.21713.5.camel@gentoo.org>
On 4/2/2018 4:32 PM, Michał Górny wrote:
> W dniu pon, 02.04.2018 o godzinie 13∶27 -0400, użytkownik Joshua Kinard
> napisał:
>> On 4/2/2018 5:41 AM, Michał Górny wrote:
>>> W dniu nie, 01.04.2018 o godzinie 20∶40 -0700, użytkownik Matt Turner
>>> napisał:
>>>
>>>> My plan is to add stable 17.0 mips profiles when the keywording is
>>>> sorted out and kill two birds with one stone.
>>>
>>> Does it involve fixing the CHOST inconsistency so that we can finally
>>> get LLVM keyworded?
>>
>> Bug #515694, right? Based on a very quick re-read, there are two
>> issues/blockers here:
>>
>> 1) Current Gentoo/MIPS support was originally based on gcc, thus, we've used
>> CHOST tuples that are recognized by gcc.
>
> As far as I'm aware GCC doesn't really care about which triplet is used.
> It's all controlled by --with-abi= option (I may have mistyped its
> name).
gcc might not, but odds are incredibly likely other software will. I want to
say memory reminds me that glibc may be a culprit here, and may explain the
reason why someone redesigned the triplets/tuples in the first place. E.g., I
*think* (but can't corroborate) that the "mips64-unknown-linux-gnuabin32" tuple
derived from glibc wanting to determine n32 support from the CHOST. Again,
though, there are no known equivalents of this for uclibc-ng or musl targets
that I know of.
>> 2) clang lacks a CHOST tuple that defaults to n32. n32 is the "ideal" ABI for
>> a 64-bit platform that doesn't need full 64bit (n64) binary support.
>>
>> As far as I can tell, we need to fix #2 before we can do anything about #1.
>> Once clang has a discrete CHOST tuple for n32, that'll put it on parity with
>> gcc, which itself appears to have a batch of more specific tuples to select
>> different ABIs. You might want to just push upstream any patches you have that
>> adds this support first.
>
> It's chicken-egg problem. Before I can submit a patch upstream, I need
> someone with MIPS hardware and a proper profile (using disjoint,
> consistent triplets) to test it. Not to mention Gentoo needs to decide
> on the triplet in the first place.
Is there an option to cross-compile clang/llvm using a CHOST added by your
patch? That should at least validate that the CHOST logic works out. Any one
of us could then test out a statically-linked binary generated from such a
toolchain, assuming the target output matches one of our machines.
As far as Gentoo "deciding", I have to argue that it's not an "our fault" thing
or such. Back when the port was started in ~2003, there was no such thing as
clang/llvm, so we used what CHOSTs gcc was happy with. Life continued on from
there, with a few hiccups along the way.
I know of no authority that sets/decides what CHOSTs are valid and what aren't.
That'd probably be a nice thing to have, TBH, as my irritation with FreeBSD's
versioned CHOSTs makes updating a Gentoo/FreeBSD userland mildly annoying.
That said, I don't have much of a problem adopting the Debian versions[1]. We
would just need a way to migrate existing installs, preferably w/o having to
recompile everything...
1. https://wiki.debian.org/Multiarch/Tuples
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
6144R/F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
"The past tempts us, the present confuses us, the future frightens us. And our
lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
next prev parent reply other threads:[~2018-04-03 5:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 3:40 [gentoo-mips] Monthly mips@ project status for April 2018 Matt Turner
2018-04-02 7:37 ` Joshua Kinard
2018-04-02 7:39 ` Joshua Kinard
2018-04-02 9:41 ` [gentoo-mips] Re: [gentoo-dev] " Michał Górny
2018-04-02 17:27 ` Joshua Kinard
2018-04-02 20:32 ` Michał Górny
2018-04-03 5:23 ` Joshua Kinard [this message]
2018-04-02 11:25 ` [gentoo-mips] " Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c309f4c9-7f34-0574-8259-13d7aa881bb9@gentoo.org \
--to=kumba@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=gentoo-mips@lists.gentoo.org \
--cc=mgorny@gentoo.org \
--cc=mips@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox