Commit Graph

465 Commits

Author SHA1 Message Date
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
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
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
Andrew Hsieh
54009f7e95 am 5d774594: Merge "ndk: Fix WCHAR_MIN / WCHAR_MAX definitions."
* commit '5d7745946dfc76dc2c82ef4ff097dedd8913e393':
  ndk: Fix WCHAR_MIN / WCHAR_MAX definitions.
2013-07-22 09:30:19 -07:00
David 'Digit' Turner
fe8625d401 ndk: Fix WCHAR_MIN / WCHAR_MAX definitions.
This fixes WCHAR_MIN / WCHAR_MAX to be signed / unsigned based on
the target ABI.

This only impacts ARM where wchar_t is really 'unsigned int'.
One can define _WCHAR_IS_ALWAYS_SIGNED to restore the old behaviour.

See http://b.android.com/55749

Change-Id: Idb63b7b11aecd3cfee37f5b6dd2eba78b308876f
2013-07-20 00:56:53 +02:00
Jesse Hall
2bfb93da26 am 4b571253: Merge "Load ES3 functions with eglGetProcAddress, not dlsym" into jb-mr2-dev
* commit '4b571253095629540ecee414caa9e601ec304e6a':
  Load ES3 functions with eglGetProcAddress, not dlsym
2013-07-10 09:36:09 -07:00
Jesse Hall
b7a2e33c11 Load ES3 functions with eglGetProcAddress, not dlsym
Using dlopen/dlsym works, but eglGetProcAddress is a little easier and
more consistent with how GL extension functions (rather than these
non-extension functions) are loaded.

Change-Id: I082c193f08f7d5456389ab783a06cd38a9632d53
2013-07-09 11:31:33 -07:00
Andrew Hsieh
1175ccb028 am c7ef0a3c: am 56de69b3: Merge "ndk: <sys/cdefs.h>: make wchar_t 32-bit for all API levels."
* commit 'c7ef0a3c0379a2ca81b6f82a9746c3c5405b8598':
  ndk: <sys/cdefs.h>: make wchar_t 32-bit for all API levels.
2013-07-08 16:01:54 -07:00
Andrew Hsieh
56de69b35b Merge "ndk: <sys/cdefs.h>: make wchar_t 32-bit for all API levels." 2013-07-08 22:59:16 +00:00
Andrew Hsieh
822b8e0705 am c42111c3: am 7fc5e915: Merge "Fix <inttypes.h> declaration for pointer-related PRI/SCN macros."
* commit 'c42111c3ed4c48a957b810c3f4d6f9f56f2f5931':
  Fix <inttypes.h> declaration for pointer-related PRI/SCN macros.
2013-07-08 09:34:45 -07:00
David 'Digit' Turner
f85e243cdb ndk: <sys/cdefs.h>: make wchar_t 32-bit for all API levels.
This patch ensures that wchar_t is a 32-bit number when targetting
API level < 9 (i.e. Froyo or older).

You can restore the previous (and broken) behaviour by defining
_WCHAR_IS_8BIT at compile time. See http://b.android.com/57267
for more context.

BUG=57267

Change-Id: Ib334e8fe95a3f592d5d4bb157b0f123984133597
2013-07-04 16:30:41 +02:00
David 'Digit' Turner
530a3ca575 Fix <inttypes.h> declaration for pointer-related PRI/SCN macros.
This ports the following Bionic libc fix to the NDK header:

  https://android-review.googlesource.com/#/c/61703/2

BUG=57218

Change-Id: I0c5fef17f0c1bb3a89c00edf51f494cbf7bda435
2013-07-03 15:13:49 +02:00
Jesse Hall
a2ad5a69b7 am 163e7c5e: Merge "Add a sample showing how to use OpenGL ES 3.0" into jb-mr2-dev
* commit '163e7c5e50124f6ea87e6aed49722bae1fd42563':
  Add a sample showing how to use OpenGL ES 3.0
2013-06-29 21:09:49 -07:00
Jesse Hall
2eceb17d62 am 5e427929: Merge "Add GLESv3 to future NDK release" into jb-mr2-dev
* commit '5e42792955753495f3643260b7a8af099dac32f9':
  Add GLESv3 to future NDK release
2013-06-29 21:04:31 -07:00
Jesse Hall
a451b018f6 Add a sample showing how to use OpenGL ES 3.0
Change-Id: If834a23ad3ad2164e6fdc40f865ee28cfa93de7e
2013-06-24 11:12:42 -07:00
Andrew Hsieh
f56a37e539 Fix wchar.h not to redefine WCHAR_MAX/WCHAR_MIN
Change-Id: I6c6f2e020b72cce4c8665133ea0a0c5db977e348
2013-06-21 11:11:35 -07:00
Andrew Hsieh
d166ec49f9 Add clone in x86
clone is already declared in header and exists in both arm/mips libc.
Add the missing one in libc.so and libc.a (*1) for x86.

(*) only updated bionic_clone.o and clone.o from build after
22d366cc09383956dc264ed4641572e609392eee

Change-Id: Ibcb39948d48b84398543d84304ead21dab534c40
2013-06-19 18:02:20 -07:00
Andrew Hsieh
9100913446 Merge "stdint.h header is not fully compatible with C99(ISO9899:1999)" 2013-06-19 20:30:02 +00:00
Jesse Hall
c05863dac1 Add GLESv3 to future NDK release
* Headers were copied from frameworks/native/opengl/include/GLES3/.
* Symbol lists were generated with ndk/build/tools/gen-system-symbols.sh.
* Symbols are identical between architectures

Change-Id: I011094ea3b479cf166ffb6bef3778cde683fc502
2013-06-18 10:19:36 -07:00
Andrew Hsieh
38c1a99c61 Merge "Fix malloc_usable_size() declaration." 2013-06-06 05:35:06 +00:00
Andrew Hsieh
5b1e1adadc Fix AMotionEvent_getHistorical* to take const AInputEvent* motion_event
See b.android.com/55873

Change-Id: I5ad9160ff286c291feece2deda647af66e251bb5
2013-05-27 12:12:53 +08:00
David 'Digit' Turner
bb37dac9fa Fix malloc_usable_size() declaration.
This doesn't break the ABI.

See https://android-review.googlesource.com/#/c/59195 for corresponding
fix in the C library.

See http://b.android.com/55725 for details.

Change-Id: Id01e38ef7951368897b9bbaae09741fa927fd548
2013-05-23 10:08:44 +02:00
Andrew Hsieh
25c7f95934 Fix x86 endian.h
See https://code.google.com/p/android/issues/detail?id=54465
and https://android-review.googlesource.com/#/c/57242

Change-Id: Ib61fc0696e4979421f9bc6916c776a41fdc8be71
2013-04-22 11:25:41 +08:00
Andrew Hsieh
3c10a2037e Fix sys/un.h to be included on its own
See https://code.google.com/p/android/issues/detail?id=53711
https://android-review.googlesource.com/#/c/42763

Change-Id: Ibd8a445dfde752cddab61b3ae53ad077738701ea
2013-04-01 14:02:06 +08:00
Andrew Hsieh
3ccf4f2c03 Deprecate __set_errno; Add #include <stdint.h> in elf.h
1. __set_errno is deprecated and subject to removal in future release
2. elf.h is seen to be included alone, causing compilation error due
   to undefined uint32_t and uint64_t

Change-Id: I4ca348a8ba0689eb3880622dcf5c53be470c57e8
2013-03-27 10:44:19 -07:00
Andrew Hsieh
228a227967 Fix X86 sigsetjmp and siglongjmp
Both exist in header android-X/arch-<arch>/usr/include/setjmp.h
already.  Add to X86 to be consistent with header and other archs
ARM/MIPS

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

Change-Id: I635c6c0491f5bf2aaa9013f23cb4b1bf7cb57a40
2013-03-14 14:40:37 -07:00
Andrew Hsieh
d7faff47ab Merge "Added struct Elf32_auxv_t and Elf64_auxv_t" 2013-03-14 20:28:20 +00:00
Andrew Hsieh
1d1bc5287d Fix OpenSLES_AndroidConfiguration.h to be usable for C code
See https://code.google.com/p/android/issues/detail?id=53163

Change-Id: I0eaa3f93860134daf7d589696e47828166fbc899
2013-03-14 10:33:15 -07:00