[Toybox] [landley/toybox] Help building toybox with the NDK/bionic (#43)

Rob Landley rob at landley.net
Tue Aug 16 13:35:47 PDT 2016


On 08/11/2016 08:25 PM, Matthias Urhahn wrote:
> I've tried to setup the latest NDK to test #36
> <https://github.com/landley/toybox/issues/36>. I followed the
> instructions here
> <https://developer.android.com/ndk/guides/standalone_toolchain.html>, to
> export a standalone toolchain.

I hadn't found that page before, so I gave it a try.

The NDK download page is
https://developer.android.com/ndk/downloads/index.html and the linux
version is a 750 megabyte download, which ground away through through
coffee shop wifi at about 120k/second for the rest of that evening so I
didn't get back to it for a few days.

When I did, I got hello world to build:

android-ndk-r12b$ toolchains/x86_64-4.9/prebuilt/linux-x86_64 \
  /bin/x86_64-linux-android-gcc --static hello.c \
  --sysroot=$PWD/platforms/android-24/arch-x86_64

Which was a little bit awkward and the resulting a.out is over 3 megs.
Stripping it brings it down to 489984 bytes for basically a call to
printf(). Still, it ran.

This email has now been sitting open on my desktop for 3 days with no
further progress, so I should probably just send it. :)

Next up, I should try building toybox with it and see what happens.

Rob


More information about the Toybox mailing list