[LTP] [PATCH v1] include/mk/env_post.mk: enable __ANDROID__ definition for Android build

Petr Vorel pvorel@suse.cz
Wed Apr 24 22:19:51 CEST 2019


Hi Steve, Zhengwang,

> Using Sandeep's instructions and with your latest merged fixes I was able to
> build unmodified upstream with the NDK. I just tried running one of the test
> binaries on my device to sanity check it.

> I put in an #error if __ANDROID__ is defined and it does look to be set by
> the NDK compiler. FWIW I am using Android API level 26, the minimum which
> provides hasmntopt. This gets configured in the "Set up ndk toolchains for
> autoconf" step Sandeep mentioned by setting the CC and CXX env vars
> appropriately.
Thanks for testing. IMHO this is a simple proof that this patch (-D__ANDROID__)
is not needed.

...
> >  In the case of cross-compilation, I think it still makes sense, since
> > we can use the same toolchain, such as clang,  and build parameters
> > (the specify the include headers and libs, etc) as AOSP.

> but it's not clear to me since you need to have bionic around anyway, and at
> that point, why not just use the Android toolchain?
No, you're right, that does not make sense.


> thanks,
> Steve

Kind regards,
Petr


More information about the ltp mailing list