Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160504175410.GS21636@brightrain.aerifal.cx>
Date: Wed, 4 May 2016 13:54:11 -0400
From: Rich Felker <dalias@...c.org>
To: Rob Landley <rob@...dley.net>
Cc: musl@...ts.openwall.com, j-core@...ore.org
Subject: Re: Re: [J-core] musl-cross-make / litecross improvements

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.