On Fri, Mar 8, 2019 at 10:47 AM Rob Landley <[email protected]> wrote: > > On 3/5/19 6:23 PM, Rob Landley wrote: > > landley@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 _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
