Commit Graph

765 Commits

Author SHA1 Message Date
Andrew Hsieh
ba780a0e47 Merge "Refresh API19 include/android/* to android-4.4_r1" 2013-11-05 00:39:37 +00:00
Andrew Hsieh
c0567b54c5 Rename modules NativeActivity
To TeapotNativeActivity and MoreTeapotsNativeActivity, respectively

Change-Id: Iddbb326ef246232e64a9c30138edb55efe86230d
2013-11-05 08:12:46 +08:00
Hak Matsuda
13754d53c3 Addressed feedbacks
- Now they are in ndkHelper:: name space
- Changed module name to ndk_helper
- Changed some static members to class var or stand alone function
- Added syncronization for JNIHelper.cpp
- For a documentation, I will work with doc writer for future improvement

Change-Id: I0055061a4f53b1904cde2e0339550ee277b35fc5

Addressed most of feedbacks,
- Switched coding standard to Chrome style
- Update JNI helper, and documented
- Fixed other issues that is pointed out

Change-Id: Icc729a55ed8dd613759f34a3fc35cb4949d2d205
2013-11-05 08:09:19 +08:00
Andrew Hsieh
86c3b43906 Refresh API19 include/android/* to android-4.4_r1
Change-Id: I9cef03099c68cc0bfeaeedbf8b7d3f1dccc09a50
2013-11-04 11:13:53 +08:00
Andrew Hsieh
a915811733 Remove obsolete ndk/platforms/android-9/arch-x86/src/__dso_handle*.S
Superceded by __dso_handle.h

Change-Id: Ic224b8a1ed74a9535ae9f8814f3450cb4f92efb6
2013-11-04 10:42:21 +08:00
Andrew Hsieh
effaa95815 <pthread.h>: Mark pthread_exit() as __noreturn
Same fix as https://android-review.googlesource.com/#/c/67540/
Fix for: https://code.google.com/p/android/issues/detail?id=60686

Change-Id: I27b8f1ed71dbb44f3598f7f4551bd881754ef945
2013-11-04 10:37:50 +08:00
Andrew Hsieh
4abacac32d Merge "Fix prototype of poll" 2013-11-04 00:30:46 +00:00
Elliott Hughes
07bdc2b8e6 Merge "Fix build." 2013-11-01 04:24:08 +00:00
Elliott Hughes
0d86e637f6 Fix build.
Change-Id: If09775ab21fef5b1df0222f07443a55190ae7a1c
2013-10-31 18:41:52 -07:00
Andrew Hsieh
61097c7e51 Fix prototype of poll
from poll(struct pollfd *, nfds_t, long) to
poll(struct pollfd *, nfds_t, int)

See 11952073af22568bba0b661f7a9d4402c443a888
and ebfbb367fb

Change-Id: Idba600d4b172404f0a1d5d715febcba8a495a770
2013-11-01 08:33:08 +08:00
Andrew Hsieh
55530bf387 Merge "ndk: Add missing declaration for mkdtemp" 2013-10-29 01:52:24 +00:00
David 'Digit' Turner
82703204a9 ndk: Add missing declaration for mkdtemp
The mkdtemp() function has always been implemented in the C library
(see [1] for proof) but was missing a declaration in <stdlib.h>, until
Android 4.0.1 [2]

This patch simply adds the missing declaration to former <stdlib.h>
versions. This makes it easier to build certain open-source programs
for Android, because auto-tools probing typically looks at the symbols
in libc.so to define HAVE_MKDTEMP, then the source fails to compile
because of the lack of declaration.

Note that the mkdtemp is also already listed in
platforms/android-*/arch-*/symbols/libc.so.functions.txt, which were
generated by parsing actual system libraries, and thus don't need to
be updated here.

[1] https://android.googlesource.com/platform/bionic/+/android-1.6_r1/libc/stdio/mktemp.c
    https://android.googlesource.com/platform/bionic/+/android-1.6_r1/libc/Android.mk

[2] ad1ff2fb26

Change-Id: I838b54bcb5cbfd2fed24cf7649897889ec7a5559
2013-10-28 18:46:54 +01:00
Hak Matsuda
5d1c91fb75 cleaned code, added pinch gesture detector, better opengl context handling, fixed issues
Change-Id: I26a28374ae74391204586b4584d03cf0c58772c2
2013-10-28 11:41:58 +08:00
Elliott Hughes
122d194b36 Merge "Fix incorrect extern declaration of poll(2)." 2013-10-25 17:19:25 +00:00
Elliott Hughes
ebfbb367fb Fix incorrect extern declaration of poll(2).
Change-Id: I9ed5136a6b7d20fd0520e09d455a0447ea73e122
2013-10-25 09:07:42 -07:00
Ben Cheng
2e2d9927e5 Refresh sysroot headers for aarch64.
Change-Id: I2443ff351aec5d558cb7843885e5b3f8177527e8
2013-10-17 14:07:49 -07:00
Andrew Hsieh
956fc5ca9e Merge "Add libm_hard.a for armeabi-v7a" 2013-10-17 11:43:29 +00:00
Andrew Hsieh
059df41ed9 Add libm_hard.a for armeabi-v7a
A math library compiled with -mhard-float.  Build instructions:

1. cd to a recent Android source tree: bionic.git
   fbefb252b09634114977dbd1b48dd42bb2629b83 (internal) in this case
2. Temporarily remove "-mfloat-abi=softfp" from build/core/combo/arch/arm/armv7*
   and build/core/combo/TARGET_linux-arm.mk
3. Temporarily add "-mhard-float -mfloat-abi=hard" to LOCAL_CFLAGS
   for libm.a in bionic/libm/Android.mk
4. make -B -j32 out/target/product/generic/obj/STATIC_LIBRARIES/libm_intermediates/libm.a
5. Rename it

Change-Id: I107eea48af75e97b448862cfc7aae2e8f8911a63
2013-10-17 19:41:06 +08:00
Andrew Hsieh
5881b5cbe7 Add __NDK_FPABI__ to function taking/returning float/double
Allow user code to be compiled with "-mhard-float" for armeabi-v7a
(which implies -mfloat-abi=hard), and either link with
1. Android native APIs which use softfp, or
2. A customized libm_hard.a which is compiled with -mhard-float. Need
   -D_NDK_MATH_NO_SOFTFP=1

See tests/device/hard-float/jni/Android.mk for details and restriction
on Clang

Change-Id: I773a842c73368e08b9a6cda0441e95a96fa303b2
2013-10-17 19:15:22 +08:00
Andrew Hsieh
a36935be21 Merge "Add missing math functions" 2013-10-17 10:54:18 +00:00
Andrew Hsieh
e3f5a9c5dd Merge "Update libandroid.so for API9 .. API18" 2013-10-17 00:27:47 +00:00
Ben Cheng
bfd1ec82b4 Merge "Use updated uapi headers for aarch64." 2013-10-17 00:27:11 +00:00
Ben Cheng
6570d523c4 Use updated uapi headers for aarch64.
Change-Id: I6093b3908f26842524acd5ba845e083b8ad6a888
2013-10-16 17:24:18 -07:00
Andrew Hsieh
0df3e70b99 Add missing math functions
1. Add sincos, sincosf, and sincosl to API >= 9 (for ARM only,
   because X86 and MIPS have it already)
2. Add nan, nanf, nanl, and tgammaf to API >= 13 (11 actually,
   but we don't want to add another API which is not released)
3. Add log2, log2f, log2l, logbl, nexttoward, and nexttowardl to
   API >= 18

See b.android.com/38423

Change-Id: I0a756aeeddafc3862f3c0ae38218cb3301608231
2013-10-15 15:55:12 +08:00
Andrew Hsieh
0c147ba2dc Update libandroid.so for API9 .. API18
This CL update library.  See
f3c3a93bc4 for API13..18 header update

Add functions:

android-9:
  AMotionEvent_getHistoricalRawX
  AMotionEvent_getHistoricalRawY
  AMotionEvent_getHistoricalTouchMajor
  AMotionEvent_getHistoricalTouchMinor
  AMotionEvent_getHistoricalToolMajor
  AMotionEvent_getHistoricalToolMinor
  AMotionEvent_getHistoricalOrientation

android-13:
  AAsset_seek64
  AAsset_getLength64
  AAsset_getRemainingLength64
  AAsset_openFileDescriptor64
  AConfiguration_getScreenWidthDp
  AConfiguration_setScreenWidthDp
  AConfiguration_getScreenHeightDp
  AConfiguration_setScreenHeightDp
  AConfiguration_getSmallestScreenWidthDp
  AConfiguration_setSmallestScreenWidthDp
  AMotionEvent_getAxisValue
  AMotionEvent_getHistoricalAxisValue
  ANativeWindow_fromSurfaceTexture (removed in >=API16)
  android_getTtsEngine
  getTtsEngine

android-14:
  AMotionEvent_getButtonState
  AMotionEvent_getToolType

android-15:
  << none >>

android-16:
  Remove ANativeWindow_fromSurfaceTexture

android-17:
  AConfiguration_getLayoutDirection
  AConfiguration_setLayoutDirection

android-18:
  << none >>

Also
  1. remove android-16/include/android/native_activity.h which is the
     same as android-13's
  2. fix input.h comments and missing args, same as
     9d0136004f for android-9
  3. sort android-9's libandroid.so.functions.txt for easier comparison

See https://code.google.com/p/android/issues/detail?id=47150
    https://code.google.com/p/android/issues/detail?id=58528

Change-Id: Iaa88fe45d188482fd0905ca54180c635ab02dd95
2013-10-14 18:44:24 +08:00
Andrew Hsieh
dc5ecc7e3e Add arch-mips64 symlink
To build mips64el-linux-android-4.8
eg.
  ./build/tools/gen-platforms.sh --minimal --dst-dir=$NDK --ndk-dir=$NDK --overlay --arch=mips64
  ./build/tools/build-gcc.sh /tmp/ndk-$USER/src $NDK mips64el-linux-android-4.8 \
     --with-python=prebuilt --try-64

Change-Id: Ia1d4e12db2da18b1a20bcb00e754c23d8b5ba990
ToDo: Need to update platforms/android-9/arch-mips/src/crt*
2013-10-14 13:46:57 +08:00
Ben Cheng
6972ffa798 Merge "Initial set of minimal sysroot headers to build aarch64-gcc." 2013-10-08 23:50:05 +00:00
Ben Cheng
032d79d013 Initial set of minimal sysroot headers to build aarch64-gcc.
These files are copied over from arch-arm and to be used as boilerplates
only for now.

Change-Id: I61662e4fb9b7582174ef806e5d7eb8ed28e3a1f6
2013-10-08 15:48:50 -07:00
Andrew Hsieh
cb83cfb5fc Merge "Refresh include/sys/vfs.h" 2013-10-08 01:58:12 +00:00
Grigoriy Kraynov
fc36418fb2 Little fix for headers comparison tool
Change-Id: Iaa9602a0d5f6864d65bc0e41bef7573bd5499b84
Signed-off-by: Grigoriy Kraynov <grigoriy.kraynov@intel.com>
2013-10-07 17:30:08 +04:00
Andrew Hsieh
16af6afb9a Refresh include/sys/vfs.h
1. Sync bionic's, remove mips-specific one
2. Fix statfs.c to transfer the new f_flags too
3. Revise comment about --wrap=symbol

Change-Id: If68818e3dcb2a4056cd0b2e100fcfb8b2156c33a
2013-10-07 15:39:47 +08:00
Brian Carlstrom
22c1fdc8f3 Fix MIPS build
(cherry picked from commit f9695cbd669fd024d805319a279c7c93db7263dc)

Change-Id: Ife90c3c5094b5b429f81cf0168a2d0c550aae02f
2013-10-02 17:11:57 -07:00
Andrew Hsieh
1b8ffe3331 Move Teapot to android-17 and set APP_ABI := all
For the default configuration to run on more devices: ARM/Intel/MIPS >= API17

Change-Id: I52145374d0c51624c7a295dc8092f8492e591dee
2013-09-16 10:32:55 +08:00
Iceberg Fu
f74a8b0a63 Fixed array-index-out-of-bound in Teapot sample
Fix issue used to crash on MIPS/X86 device.  ARM device works by accident

Change-Id: I401f4954841b6f59d3ea001e5e6a70c46045a7e1
2013-09-16 10:17:17 +08:00
Andrew Hsieh
cfb3c3ff05 Merge "Fix sample bitmap-plasma to draw on whole screen" 2013-09-13 11:34:17 +00:00
Andrew Hsieh
055992fa7d Fix sample bitmap-plasma to draw on whole screen
The previous dimension 200x200 is tiny these days

Change-Id: I7d7a7d93b3e60bd4dcd8a2b22b97fc7ed9ca4dfa
2013-09-13 18:29:42 +08:00
Andrew Hsieh
99da728a3d Fix error about multiple unsequenced modifications
The evaluation order of function args aren't gaurenteed in C++

jni/NDKSupport/vecmath.h:869:32: warning: multiple unsequenced modifications to 'i' [-Wunsequenced]
        LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]);

Change-Id: Ibf69978dd3abf57a7042624aad3d416a0f6f5e01
2013-09-13 17:47:47 +08:00
Hak Matsuda
f39a078023 Add NDK sample to demonstrate more OpenGL&Gaming related technologies.
Change-Id: I0fb56c1fd1aa82d5a7c4da5010e00e103146ba78
2013-09-13 15:12:22 +08:00
Andrew Hsieh
c2e61c3c01 Fix issue 58135 about _C_LABEL_STRING macro w/o space between literal in C++
Change-Id: Iefc3c090071f3629998515d43907139b07105672
2013-09-06 17:34:31 +08:00
Andrew Hsieh
d9124876f0 arch-specific diff of header
Change-Id: I78e2186dc7e491095201efc2c709f26e8822a076
2013-09-06 16:25:41 +08:00
Michael Wright
f3c3a93bc4 Update NDK's android headers
Change-Id: I2ae3b42dcbbdccbcae018f768dc7b56723416d21
2013-08-29 18:17:46 -07:00
Grigoriy Kraynov
eaf0281f45 Remove missing functions imaxabs() and imaxdiv() from inttypes.h
Bionic does not have actual implementation of those functions.
Further implementations should be introduced in new
API-level in order to prevent break of compatibility.

Change-Id: I0aa65ea28082cf4a88c383ce0d8eceaa5288c027
Signed-off-by: Grigoriy Kraynov <grigoriy.kraynov@intel.com>
2013-08-12 16:31:10 +04:00
Andrew Hsieh
52d6614480 Merge "Update mips crtfiles from bionic with C versions" 2013-08-06 01:21:29 +00:00
Andrew Hsieh
cb4fcab5c4 Merge "Add minimal supports to build multilib x86 toolchain with OpenMP" 2013-08-06 01:21:03 +00:00
Andrew Hsieh
f43a290c1b Update mips crtfiles from bionic with C versions
Copied from bionic but adding back .ctors and .dtors to be
compatible with old Android system linkers.  Otherwise
static executable may segfault.

Change-Id: If834123161744cd2387a2c031a2315e818c2f123
2013-08-05 14:21:06 +08:00
Andrew Hsieh
09073f3d88 Add minimal supports to build multilib x86 toolchain with OpenMP
Change-Id: I095c15d2a2de11992890c2a03be0f90332d372de
2013-08-02 17:06:40 +08:00
Andrew Hsieh
aecb5c6d65 Add boostrap lib to build multilib x86 GCC with OpenMP support
Build instructions:

  cd AOSP=<your-AOSP-path>
  cd $AOSP/bionic/libc
  ln -s arch-x86 arch-x86_64

  export NDK=$AOSP/ndk
  cd $NDK
  ./build/tools/gen-platforms.sh --dst-dir=$NDK --ndk-dir=$NDK --overlay --arch=x86_64

  # copy $NDK/platforms/android-9/arch-x86_64/usr/lib, lib64, and libx32 over

Change-Id: I021a34fa139456540bc0afdb1d9636df165f92fe
2013-08-02 14:34:01 +08:00
Andrew Hsieh
80c93fbede Fix gles3jni build with clang at android-11
jni/gl3stub.c:21:5: error: implicit declaration of function 'eglGetProcAddress' is invalid in C99
    FIND_PROC(glReadBuffer);
    ^
jni/gl3stub.c:20:37: note: expanded from macro 'FIND_PROC'
    #define FIND_PROC(s) s = (void*)eglGetProcAddress(#s)
                                    ^
1 error generated.

Change-Id: I907f33e3d88f3e96bf7958102e90bf15529748b9
2013-07-31 13:27:23 +08:00
Andrew Hsieh
65675341ac Add TCP_INFO state enum values.
See b.android.com/38881 and fix in bionic
0dff43cab41e4a0bd5bd018584952c68cb224977

Change-Id: I2417fe3cf43919bf363f36c337ea6813f13699d8
2013-07-29 20:15:57 -07:00
Pavel Chupin
e5c9f8ec5a Update x86 crtfiles from bionic with C versions
Files are copied as is from bionic head.
Also adding arch-x86_64 symlink to be able to generate arch-x86_64
crtfiles/libs.

Change-Id: I0b40c1c19bb4e3b24b25fa2bcb9236469fa32a3e
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-07-25 20:55:38 +04:00