[Toybox] [PATCH] Pass cflags and hostcc in mkroot.

Rob Landley rob at landley.net
Tue Oct 15 23:10:50 PDT 2019


On 10/14/19 7:44 PM, Denys Nykula wrote:
>> Specifying HOSTCC="/path/to/thingy --options" on the command line bypasses the
>> airlock step entirely, so it'll wrap the hostcc it finds but then use something
>> else. :) That's ugly but works.
> 
> I meant after reading mkroot more closely I welcome the variables status quo.
> No need pass through more.

Ok.

> However the airlock and all HOSTCC usage could
> inline -static by default, not in HOSTCC but in their commands after HOSTCC,
> then HOSTCC is a clean path to an executable.

Static linking against glibc tends to break stuff (like DNS lookup) and produce
TONS of warnings.

And mkroot does build toybox with LDFLAGS=--static.

> Sorry I word bad! Pkgsrc environment dependencies are kernel, libc,
> headers, toolchain, core utils, shell, awk and wget. They (pkgsrc) expect
> you to cross-compile these from a fat host, then pkgsrc downloads and builds
> everything else natively. I just figured out how to cross-compile less and
> bootstrap without the fat host, using mcm prebuilts and toybox, first pkgsrc
> and then a complete system that can rebuild toybox. XFCE didn't eventually
> work there but Weston does, so I think I'll upload that script somewhere
> including recent changes and maintain if someone's interested.

I had a linux from scratch based one of these, which I need to reproduce. But
https://landley.net/aboriginal/about.html#hairball was a bunch of work to make
anything useful. It sounds like you have a BSD-based one you're trying to use on
Linux?

I need to get AOSP to work, and that's... not simple.

Rob



More information about the Toybox mailing list