From: Palmer Dabbelt <palmer@sifive.com>
To: Matthew.Fortune@mips.com
Cc: Jim Wilson <jimw@sifive.com>,
sebastian.huber@embedded-brains.de, gcc@gcc.gnu.org
Subject: RE: RISC-V ELF multilibs
Date: Tue, 05 Jun 2018 01:18:00 -0000 [thread overview]
Message-ID: <mhng-bff9214d-2f52-45c8-8281-4f7038ada021@palmer-si-x1c4> (raw)
In-Reply-To: <b9d6704a0c0b431a81f29b8c5b0ef521@mips.com>
On Thu, 31 May 2018 07:23:22 PDT (-0700), Matthew.Fortune@mips.com wrote:
> Palmer Dabbelt <palmer@sifive.com> writes:
>> On Tue, 29 May 2018 11:02:58 PDT (-0700), Jim Wilson wrote:
>> > On 05/26/2018 06:04 AM, Sebastian Huber wrote:
>> >> Why is the default multilib and a variant identical?
>> >
>> > This is supposed to be a single multilib, with two names. We use
>> > MULTILIB_REUSE to map the two names to a single multilib.
>> >
>> > rohan:1030$ ./xgcc -B./ -march=rv64imafdc -mabi=lp64d --print-libgcc
>> > ./rv64imafdc/lp64d/libgcc.a
>> > rohan:1031$ ./xgcc -B./ -march=rv64gc -mabi=lp64d --print-libgcc
>> > ./rv64imafdc/lp64d/libgcc.a
>> > rohan:1032$ ./xgcc -B./ --print-libgcc
>> > ./libgcc.a
>> > rohan:1033$
>> >
>> > So this is working right when the -march option is given, but not
>> when
>> > no -march is given. I'd suggest a bug report so I can track this, if
>> > you haven't already filed one.
>>
>> IIRC this is actually a limit of the GCC build system: there needs to
>> be some
>> default multilib, and it has to be unprefixed. I wanted to keep the
>> library
>> paths orthogonal (ie, not bake in a default that rv64gc/lp64d lives at
>> /lib),
>> so I chose to just build a redundant multilib.
>>
>> It'd be great to get rid of this, but I'm afraid it's way past my level
>> of
>> understanding as to how all this works.
>
> I do actually have a solution for this but it is not submitted upstream.
> MIPS has basically the same set of problems that RISC-V does in this area
> and in an ideal world there would be no 'fallback' multilib such that if
> you use compiler options that map to a library variant that does not
> exist then the linker just fails to find any libraries at all rather than
> using the default multilib.
>
> I can share the raw patch for this and try to give you some idea about how
> it works. I am struggling to find time to do much open source support at
> the moment so may not be able to do all the due diligence to get it
> committed. Would you be willing to take a look and do some of the work to
> get it in tree?
If you have a rough patch that'd be great, it'll be at least a starting point.
Last time I poked around I wasn't ever sure where to look.
Thanks!
next prev parent reply other threads:[~2018-06-05 1:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 13:04 Sebastian Huber
2018-05-29 18:03 ` Jim Wilson
2018-05-31 9:09 ` Palmer Dabbelt
2018-05-31 14:23 ` Matthew Fortune
2018-05-31 19:28 ` Jim Wilson
2018-06-05 1:18 ` Palmer Dabbelt [this message]
2018-06-01 6:23 ` Sebastian Huber
2018-06-01 6:16 ` Sebastian Huber
2018-06-01 8:23 ` Michael Clark
2018-06-01 11:16 ` Sebastian Huber
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=mhng-bff9214d-2f52-45c8-8281-4f7038ada021@palmer-si-x1c4 \
--to=palmer@sifive.com \
--cc=Matthew.Fortune@mips.com \
--cc=gcc@gcc.gnu.org \
--cc=jimw@sifive.com \
--cc=sebastian.huber@embedded-brains.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).