mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Michael Clark <michaeljclark@mac.com>
To: musl@lists.openwall.com
Cc: Alan Pillay <alanppillay4@gmail.com>, lowrisc-dev@lists.lowrisc.org
Subject: Re: Re: [lowrisc-dev] Weekly Report of Porting musl to RISC-V Project #5
Date: Sun, 28 May 2017 11:24:53 +1200	[thread overview]
Message-ID: <405DCB5E-B096-477D-BE47-ABE85C34D97B@mac.com> (raw)
In-Reply-To: <3E8336E8-5DAF-402C-A538-5FDCF197F169@mac.com>

[-- Attachment #1: Type: text/plain, Size: 4477 bytes --]

BTW RISC-V Linux is now under patch review for upstreaming into Linux kernel as it is a dependency for upstreaming glibc, so the ABI is essentially frozen:

- https://lkml.org/lkml/2017/5/22/1058 <https://lkml.org/lkml/2017/5/22/1058>
> On 28 May 2017, at 11:19 AM, Michael Clark <michaeljclark@mac.com> wrote:
> 
> Hi,
> 
> I’ve restarted the musl port for RISC-V based on this tree (which appeared to be the most recent):
> 
> - https://github.com/lluixhi/musl-riscv <https://github.com/lluixhi/musl-riscv>
> 
> I have a pull request against that tree that has some fixes and merges upstream, but is still parented against lluixhi
> 
> - https://github.com/lluixhi/musl-riscv/pull/3 <https://github.com/lluixhi/musl-riscv/pull/3>
> 
> I also have a branch with the same changes rebased against musl upstream git.
> 
> - https://github.com/rv8-io/musl-riscv/tree/musl-upstream <https://github.com/rv8-io/musl-riscv/tree/musl-upstream>
> 
> I obviously can’t make a pull request with a rebased tree so I have two branches, one parented to musl-riscv and the other parented to musl upstream.
> 
> When I started, the tree did not compile due to a change in definition of long double to float128. I got the tree to compile by bringing in the QP changes but busybox linked against the resulting lib would fail with permission denied errors. I found that the stat.h was not the asm-generic version. RISC-V does not have it’s own syscall table and just uses the version in asm-generic, likewise for the stat structure. It seems the tree might have imported stat.h from another arch or been based on an earlier riscv-linux. I’ve brought in the generic versions from aarch64. The tree can now build a working busybox on a relatively recent riscv-linux tree i.e. Jan-2017, and it should work on latest riscv-linux as I don’t believe there have been any recent ABI breaks.
> 
> So the port now passes the "busybox will run” test. Next on the list is to review the atomics. I have a commit I am preparing that defines a_cas similarly to aarch64 with load reserved store conditional. I’d also like to learn how to use the libc test suite.
> 
> BTW Some of the RISC-V developers have asked why musl doesn’t use GCC atomic builtins? e.g.
> 
> - https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html <https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html>
> 
> Regards,
> Michael
> 
>> On 9 Dec 2016, at 1:36 PM, Alan Pillay <alanppillay4@gmail.com <mailto:alanppillay4@gmail.com>> wrote:
>> 
>> What is the current status of musl on RISC-V?
>> This was the last time I heard about it, but it has been many months since.
>> Regards.
>> 
>>> Hello,
>>> 
>>> Thanks to the folks, I passed the mid-term evaluation. Now it is about
>>> time to publish the fifth progress report on porting musl on RISC-V.
>>> 
>>> Last week, the toolchain itself has been built for RISC-V and running
>>> on Spike, and libc-test [1] can be executed with it now. I posted the
>>> result of tests on [2]. The REPORT.txt file contains all error
>>> messages of failed tests, both run-time ones and compile-time ones.
>>> 
>>> Some failures are expected since musl on x86_64 also does the same
>>> ones (e.g. errors in src/api/fcntl.c), but there are some unexpected
>>> errors too. I guess that the "warning: <the name of a header> is
>>> shorter than expected" warning indicates bugs in arch-dependent part
>>> of I/O functions or system calls (or kernel?) and it causes syntax
>>> errors in the same compilation unit.
>>> 
>>> Moreover, some tests triggers a "signal 11" error (segmentation fault)
>>> in libc. I added some logs to [2]. They are bugs in the port,
>>> obviously. I am working on them.
>>> 
>>> The good news is, anyway, some results are *better than x86_64*,
>>> especially in math functions :-)
>>> (probably the cause is the difference in the floating-point precision,
>>> though. it is usual in float tests...)
>>> 
>>> It takes long, long time to get but finally I have a (seems-to-be)
>>> working test suite for the port. I will continue to debug and fix the
>>> port using the result. Stay tuned!
>>> 
>>> 
>>> [1]: http://nsz.repo.hu/git/?p=libc-test <http://nsz.repo.hu/git/?p=libc-test>
>>> [2]: https://gist.github.com/omasanori/ee828369aea844ac7fdfdc8362953299 <https://gist.github.com/omasanori/ee828369aea844ac7fdfdc8362953299>
>>> 
>>> --
>>> Masanori Ogino
>> 
> 


[-- Attachment #2: Type: text/html, Size: 6461 bytes --]

      reply	other threads:[~2017-05-27 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09  0:36 Alan Pillay
2016-12-09  0:39 ` Rich Felker
2016-12-09  1:35   ` Alan Pillay
2016-12-20 13:11     ` Masanori Ogino
2016-12-20 16:08       ` Rich Felker
2017-05-27 23:19 ` [lowrisc-dev] " Michael Clark
2017-05-27 23:24   ` Michael Clark [this message]

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=405DCB5E-B096-477D-BE47-ABE85C34D97B@mac.com \
    --to=michaeljclark@mac.com \
    --cc=alanppillay4@gmail.com \
    --cc=lowrisc-dev@lists.lowrisc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).