Android Builds of OpenJDK Mobile project now available
Bob Vandette
bob.vandette at oracle.com
Thu Feb 18 18:28:51 UTC 2016
Ali,
I decided to take a slightly different approach to supporting NDK r10e.
My last patch did add support for this version of the NDK but forced the Java runtime
to only support API level 21 and higher. This means we would only be able to run
on devices with Android 5 and newer.
If you look at the Android Dashboard, there are still a lot of devices that are supporting
API level 19.
http://developer.android.com/about/dashboards/index.html <http://developer.android.com/about/dashboards/index.html>
I think it’s best that we set API level 19 as our minimum supported API level for now.
This means that we can still use NDK r10e but you need to specify —platform=android-19
when generating the standalone toolchain.
Taking this approach also reduces the number of changes required in the mobile/dev
forest to only 2 files.
Here’s the webrev:
http://cr.openjdk.java.net/~bobv/8150074/webrev.01/ <http://cr.openjdk.java.net/~bobv/8150074/webrev.01/>
I’ll push this change and update the build instructions.
Bob.
> On Feb 18, 2016, at 11:03 AM, Ali Ebrahimi <ali.ebrahimi1781 at gmail.com> wrote:
>
> Hi,
>
> On Thu, Feb 18, 2016 at 6:48 PM, Bob Vandette <bob.vandette at oracle.com <mailto:bob.vandette at oracle.com>> wrote:
>
>> On Feb 17, 2016, at 6:31 PM, Ali Ebrahimi <ali.ebrahimi1781 at gmail.com <mailto:ali.ebrahimi1781 at gmail.com>> wrote:
>>
>> Hi,
>>
>> On Thu, Feb 18, 2016 at 12:45 AM, Bob Vandette <bob.vandette at oracle.com <mailto:bob.vandette at oracle.com>> wrote:
>> It appears that I was correct that the NDK has improved in the latest version wrt.
>> source level compatibility with the standard Linux distros and toolchains.
>>
>> Here’s a webrev and patch that corrects compilation errors and allows both ARM and x86 Android
>> builds using the latest NDK r10e.
>>
>> http://cr.openjdk.java.net/~bobv/8150074/ <http://cr.openjdk.java.net/~bobv/8150074/>
>>
>> We should inspect all #ifdef/#ifndef __ANDROID__ uses throughout the sources
>> to see if we can remove more unnecessary logic.
>>
>> I can confirm your patch does not break any thing so far for me.
> Did you re-apply this patch on top of a clean set of sources cloned from mobile/dev?
> Yes,
> Of course, in following file
> +++ new/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2016-02-17 16:04:26.312126636 -0500
> @@ -74,25 +74,10 @@
> #endif // __STDC_LIMIT_MACROS
> #include <inttypes.h>
> #include <signal.h>
> -#ifdef __ANDROID__
> -#include <asm/sigcontext.h>
> ...
>
> #ifndef __OpenBSD__
> -#ifndef __ANDROID__
> #include <ucontext.h>
> -#endif
> +//#endif <================== we can remove #endif
>
> #endif
>
> Here, we can remove #endif (instead of commenting ) to improve code cleanness.
>
>
>
>> So we should update build requirements for NDK r10e.
> Once we integrate this patch, I will update the build requirements and instructions.
>
>
> --
>
> Best Regards,
> Ali Ebrahimi
More information about the mobile-dev
mailing list