[Toybox] NDK versions?

enh enh at google.com
Fri Mar 8 11:06:01 PST 2019


On Fri, Mar 8, 2019 at 10:47 AM Rob Landley <rob at landley.net> wrote:
>
> On 3/5/19 6:23 PM, Rob Landley wrote:
> > landley at halfbrick:~/toybox/clean$
> > CROSS_COMPILE=/home/landley/android/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-
> > LDFLAGS=--static make
>
> It took some squinting (and rereading the instructions on the website multiple
> times... why does the
> android-ndk-r19b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/ directory
> exist again? There's no cc in there.)

that's binutils. we're working on moving over to the llvm tools, but
binutils isn't going to disappear for a while. the OS already switched
for the most part, but that's a subset of all NDK uses (and mostly
under our control if there's a workaround).

> But this worked:
>
> mkdir ~/android
> cd ~/android
> wget https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip
> unzip android-ndk-r19b-linux-x86_64.zip
> ln -s x86_64-linux-android28-clang
> android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-cc
>
> cd ~/toybox
> CROSS_COMPILE=~/android-ndk-r19b/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-
> LDFLAGS=--static make distclean defconfig toybox
>
> I should stick some variant of that in the FAQ page.

maybe with a note saying that "28" should be replaced by whatever the
current highest API level is (since you're getting a static libc.a
anyway).

if you use 10000 (internally used to mean "current unreleased OS")
instead of 28 does that work? pro: you'll never have to update your
instructions. con: if we ship an NDK with new headers but forget to
update libc.a, you'll likely be the first to catch that.

> Rob



More information about the Toybox mailing list