From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10019 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: porting musl to RISCV-64 Date: Wed, 11 May 2016 13:25:18 +0200 Message-ID: <20160511112518.GB22574@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1462965936 21947 80.91.229.3 (11 May 2016 11:25:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 May 2016 11:25:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10032-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 11 13:25:36 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1b0SGj-0006ev-Ki for gllmg-musl@m.gmane.org; Wed, 11 May 2016 13:25:33 +0200 Original-Received: (qmail 21873 invoked by uid 550); 11 May 2016 11:25:31 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21846 invoked from network); 11 May 2016 11:25:30 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:10019 Archived-At: * Gry Gunvor [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.