mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: porting musl to RISCV-64
Date: Wed, 11 May 2016 13:25:18 +0200	[thread overview]
Message-ID: <20160511112518.GB22574@port70.net> (raw)
In-Reply-To: <CA+mdN-HLgwVoP9yq3fu_5_9Oru=WTh82P6jkRcg_8S4tx21sDA@mail.gmail.com>

* Gry Gunvor <gry.gunvor@gmail.com> [2016-05-10 23:05:01 -0700]:
> Newlib is small, but I am not interested in multithreading and the
> multithreading/reentrancy support they have built into the library is
> causing me problems.  So I thought I would try musl.
> 

newlib is for baremetal development, you don't
need to use threading with it, but on linux i
think it uses the mostly broken linuxthreads.

musl is a conforming posix libc so it has
complete pthreads support.

> Anyway, suppose I want to port musl to RISCV-64 and cross-compile it.
> MIPS is a RISC architecture that is rather close to RISCV, but your
> MIPS support says 32-bit (and big-endian), so I take it you have some
> dependencies on what used to be called the "machine word size" (RISCV
> is 64-bit, but the RISCV docs still call a 32-bit unit a "word"; ugh;
> so now we need a new word for "word").  Thus I suspect that this is
> going to be non-trival.  How much work is this going to be?  Hints?
> 

musl now has 32bit mips, mips64 and mipsn32 support as well.
these are different abis so they have to be separate ports,
same is true for the riscv targets.

there is a google summer of code project to add riscv support
http://www.openwall.com/lists/musl/2016/04/27/3
i think it is supposed to provide a working port within 1-2
months (?) so if you can wait you don't need to do much work.

> More generally, any comments on what do you recommend as the easiest
> thing to do?  Port musl to RISCV-64?  Use a different libc?  For those
> of you who know newlib, hack newlib to remove reentrancy goop?
> 

i don't know what you are trying to do so it's hard to tell,
if you want a complete userspace on linux then i think a newlib
subset is not enough, but if you want to get some specific
application to run then it might work.


  reply	other threads:[~2016-05-11 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11  6:05 Gry Gunvor
2016-05-11 11:25 ` Szabolcs Nagy [this message]
2016-05-11 16:32   ` Gry Gunvor
2016-05-11 16:40     ` Gry Gunvor
2016-05-11 17:28       ` Szabolcs Nagy
2016-05-11 18:48     ` Bobby Bingham

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=20160511112518.GB22574@port70.net \
    --to=nsz@port70.net \
    --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).