[Toybox] What am I doing wrong with ndk-r20?

enh enh at google.com
Mon Oct 7 13:54:41 PDT 2019


d'oh. that seems to be a real bug... __ANDROID_NDK__ went missing
between r19 and r20. congratulations on being the first person to
notice!

it looks like the removal was my fault, though i can't understand why
i did it now (because there wasn't nearly enough detail in my commit
message).

https://android-review.googlesource.com/c/platform/bionic/+/1135146
reverts the change that broke this.

On Mon, Oct 7, 2019 at 12:38 PM Rob Landley <rob at landley.net> wrote:
>
> When I do this it fails:
>
> $ CC=clang CROSS_COMPILE=~/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android16-
> LDFLAGS=--static make distclean defconfig toybox
> In file included from ./toys.h:9:
> ./lib/portability.h:290:10: fatal error: 'processgroup/sched_policy.h' file not found
> #include <processgroup/sched_policy.h>
>          ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> The header says:
>
> // libprocessgroup is an Android platform library not included in the NDK.
> #if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
> #include <processgroup/sched_policy.h>
> #else
> static inline int get_sched_policy(int tid, void *policy) {return 0;}
> static inline char *get_sched_policy_name(int policy) {return "unknown";}
> #endif
>
> The android NDK is not defining __ANDROID_NDK__?
>
> $ cd ~/android-ndk-r20/
> $ grep -r __ANDROID_NDK__
> $
>
> Apparently not.
>
> Rob
>
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list