From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10001 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [J-core] musl-cross-make / litecross improvements Date: Wed, 4 May 2016 13:54:11 -0400 Message-ID: <20160504175410.GS21636@brightrain.aerifal.cx> References: <20160503044835.GA5517@brightrain.aerifal.cx> <5729C0B2.5080707@landley.net> <20160504163329.GR21636@brightrain.aerifal.cx> 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 1462384469 25380 80.91.229.3 (4 May 2016 17:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 May 2016 17:54:29 +0000 (UTC) Cc: musl@lists.openwall.com, j-core@j-core.org To: Rob Landley Original-X-From: musl-return-10014-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 04 19:54:28 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 1ay10F-0006rB-SN for gllmg-musl@m.gmane.org; Wed, 04 May 2016 19:54:27 +0200 Original-Received: (qmail 7556 invoked by uid 550); 4 May 2016 17:54:25 -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 7529 invoked from network); 4 May 2016 17:54:24 -0000 Content-Disposition: inline In-Reply-To: <20160504163329.GR21636@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10001 Archived-At: On Wed, May 04, 2016 at 12:33:29PM -0400, Rich Felker wrote: > On Wed, May 04, 2016 at 04:28:18AM -0500, Rob Landley wrote: > > On 05/02/2016 11:48 PM, Rich Felker wrote: > > > I've made a number of improvements and fixes to musl-cross-make which > > > are in the upstream repo now, based on bug reports I got: > > > > > > - Spurious dependency on flex (upstream's fault, worked around) > > > - Spurious dependency on texinfo (ditto) > > > - Ability to use pre-installed gmp/mpc/mpfr libs > > > - Config examples for static linking, no-debug builds. > > > > > > https://github.com/richfelker/musl-cross-make > > > > > > A few things I still plan to add at some point: > > > > Still no native toolchains. :) > > In theory all you have to do to get a native toolchain is first build > and install the cross toolchain so that the cross tools are in your > path, then COMMON_CONFIG += --host=$(TARGET). I can test and see if it > works. Actually it's easier than that -- the whole point of litecross/mcmx is to automate building musl (which is effectively one of the target libs, and which the other target libs depend on) in the middle of the gcc build process so that it can complete in one pass. For cross-compiling a native compiler for the target system, however, your existing cross toolchain is what's used to build target libs, and it already has musl. Actually it already has all the target libs which you could just reuse rather than building again, so you should be able to skip building target libs altogether, but I don't think gcc's build process was made to do that. Anyway, if you do try to use litecross/mcm for the native compiler, it breaks on building musl since litecross tries to use the newly-built xgcc, which is a non-native binary (unless you have qemu + binfmt_misc installed in such a way that it happens to work). I think it's reasonably easy to work around this; I just made it work with some hacks. Rich