Commit Graph

558 Commits

Author SHA1 Message Date
Andrew Hsieh
bf78262845 Merge "Generate x86_64 symbols based on bionic 2014-03-19" 2014-03-25 10:29:52 +00:00
Andrew Hsieh
3000c633ef Merge "Disable for a while extra warnings when using [v]sprintf" 2014-03-25 10:17:05 +00:00
Andrew Hsieh
70537fd9ea Merge "Fix x86_64 alignment in crtbegin" 2014-03-25 10:06:44 +00:00
Andrew Hsieh
d8118ba51b Refresh 64-bit headers and libs
Change-Id: I300537b883705cedbcb6f21fe616f187b54c4afd
2014-03-22 17:45:39 +08:00
Pavel Chupin
fa5250051f Fix x86_64 alignment in crtbegin
Sync from bionic

Change-Id: Ic2b5f1cf87c4c89f75571f76b6a078990bfcb1e4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-21 15:23:07 +04:00
Pavel Chupin
dea9950e23 Generate x86_64 symbols based on bionic 2014-03-19
Per each lib done by:

nm out/target/product/generic_x86_64/symbols/system/lib64/libc.so
| grep "\S\+ T \S\+" | awk "{ print \$3; }" >
symbols/libc.so.functions.txt

nm out/target/product/generic_x86_64/symbols/system/lib64/libc.so
| grep "\S\+ [BGD] \S\+" | awk "{ print \$3; }" >
symbols/libc.so.variables.txt

Change-Id: I0192eb3a2df34112b053a9f798c7917cb1658efe
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-21 15:22:11 +04:00
Pavel Chupin
717581313a Disable for a while extra warnings when using [v]sprintf
Toolchain has a lot of usage of these functions and since we are
building the most components with -Werror it produces lots of errors.

Change-Id: Iaf5a95d6b493adb8d85803a62b184029060727d9
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-21 15:21:51 +04:00
Andrew Hsieh
a49155bc36 Add scalbln, scalblnf, and scalblnl to x86 libm.so for API>=18
Change-Id: Ib22eead27b8f82cfa0e1b7eb429e2c76d068120f
2014-02-26 10:38:31 +08:00
Andrew Hsieh
0faa78e6e0 Define __PTHREAD_*_INIT_VLAUE in pthread.h for API < 9
Define __PTHREAD_MUTEX_INIT_VALUE, __PTHREAD_RECURSIVE_MUTEX_INIT_VALUE,
and __PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE in pthread.h for API < 9.
Pthread.h in API >= 9 have those already since bionic
9831ad3ce6bd5b22da16a275ed67e7236eae3d1f

Change-Id: Ia97960ecbfed0811dde70f75cb23951ecdf803af
2014-02-24 13:08:12 +08:00
Andrew Hsieh
a32687f493 Merge "Fix MIPS' struct stat" 2014-02-20 23:58:18 +00:00
Elliott Hughes
72af45c116 Insulate libportable from bionic changes.
Really libportable should take its own copy of BSD's <machine/asm.h>,
rather than relying on bionic's hacked-about copies.

Change-Id: I02248045a903dc4ca0d6ed1054ecb1cd54da335e
2014-02-20 11:19:32 -08:00
Andrew Hsieh
884081d929 Fix MIPS' struct stat
In NDK r9c MIPS' struct stat was incorrectly set to its 64-bit
counterpart for API >= 12

Change-Id: I75db78ac7654fad982430e6adbe4480828776051
2014-02-20 07:56:38 +08:00
Andrew Hsieh
1c51325399 Merge "Experimental headers/libs" 2014-02-17 01:40:00 +00:00
Andrew Hsieh
73a5a3baaa Experimental headers/libs
at temp. android-20 folders

Change-Id: Iecdb083ba1b1c239bd5ecafda56356466e590565
2014-02-10 17:23:10 +08:00
Andrew Hsieh
2643554fa0 Move sys/cachectl.h up from mips-specific folder
It is only effective when compile with mips, although
development no longer has to check themselves

Change-Id: I7fb703170e1cc6bb2e6ea31109851a90a26eacb8
2014-02-10 09:28:47 +08:00
Andrew Hsieh
f0387da709 Merge "Rename arch-aarch64 to arch-arm64" 2014-02-06 22:57:34 +00:00
Andrew Hsieh
3bf77d0608 Add missing __NDK_FPABI__ to function taking/returning float/double
See 5881b5cbe7 (which missed
android-18 input.h) for details.

Change-Id: Ib23d85b676177b0a3e15bae957fc48f6ef0ededb
2014-02-05 11:30:29 +08:00
David Friedman
3b601c6550 Fixed apparent copy/paste mistake
Bug: 11634373

Change-Id: I44766217f414988bfd3be68043a4b80dd21554d8
2014-02-05 11:18:32 +08:00
Andrew Hsieh
4618dc6c2a Rename arch-aarch64 to arch-arm64
Build instruction:
  ./build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src
  ./build/tools/gen-platforms.sh --minimal --dst-dir=$NDK \
     --ndk-dir=$NDK --overlay --arch=arm64
  ./build/tools/build-gcc.sh /tmp/ndk-$USER/src $NDK \
     aarch64-linux-android-4.8 --try-64

Change-Id: Ieaac9908cd2121981e257113cb8d5d3575c8718e
2014-02-04 17:36:55 +08:00
Andrew Hsieh
ca34e29d94 Merge "Fix headers to be inclued alone" 2014-01-16 17:03:03 +00:00
Andrew Hsieh
42bb3bcadc Merge "Fix typo in comments in looper.h" 2014-01-16 17:02:47 +00:00
Andrew Hsieh
6d2d58de54 Merge "Fixed asset_manager.h, rect_manager.h, and jni.h" 2014-01-16 17:02:36 +00:00
Andrew Hsieh
2c8776805a Fix headers to be inclued alone
See b.android.com/64679 for one of header sys/prctl.h

Change-Id: Ie415ebe2086d2f0190d84fba0c57cc7e1e5822ae
2014-01-13 12:58:46 +08:00
Andrew Hsieh
3517e742e3 Merge "Implement wait4 already exist in header" 2014-01-10 00:31:50 +00:00
Andrew Hsieh
d980848377 Fix typo in comments in looper.h
Remove android-13's looper.h because it's identical to android-9's
Note that ndk/platforms/android-N only keep delta to previous level

Change-Id: Ibd2c3e168cfe7f6902fdc6eca2e2778d8ccf1fac
2014-01-08 17:24:22 +08:00
Andrew Hsieh
fbb32955a4 Fixed asset_manager.h, rect_manager.h, and jni.h
1. Fixed missing #include <sys/types.h> in android/asset_manager.h for API >= 13
2. Fixed missing #include <stdint.h> in android/rect_manager.h for API >= 14
3. Added JNICALL to JNI_OnLoad and JNI_OnUnload in jni.h

Change-Id: I875ec0b6e6f7c2f433c176f0a738eb78f3c33062
2014-01-08 14:10:06 +08:00
Andrew Hsieh
f242723e9d Fixed API18 math.h for clang3.4
Clang3.4 can take __builtin_nexttoward and __builtin_nexttowardf.
Also fix a minor typo in comment

Change-Id: If98a35e2e38c45ebd619b0ceb6c5ee41acc4e415
2013-12-30 14:14:09 +08:00
Hak Matsuda
78bf635170 Restore immersive mode when volume button has been pressed.
Workaround issue where SYSTEM_UI_FLAG_IMMERSIVE_STICKY is invalidated
when a volume button is pressed (internal bug ref b/11986621)

Immersive mode still does not recover when the screen has been
rotated, due to onSystemUiVisibilityChange is not triggered
when screen is rotated (internal bug ref b/11990702)

Change-Id: Ifdfe9b24d5c3c208441aeca0fbb2b1eaee39da95
2013-12-30 13:49:54 +08:00
Hak Matsuda
2a0781b43d Fix rendering issue in Tegra2/3.
Now having medium precision for specular variable, so that specular power can be <1.0

Change-Id: I15459d34e269ba7d31bc899460540fe390e5e294
2013-12-30 13:49:23 +08:00
Andrew Hsieh
7e25851a68 Implement wait4 already exist in header
1. Implement wait4 by calling __wait4 exists in libc.so
2. Add wait4 to libc.a

Change-Id: I08b6555cc50ee88358cd2ec63f9d8d2d4482305a
2013-12-30 11:57:38 +08:00
Todd Fiala
cfa0f35d00 Add support for building the NDK's native_app_glue.
Required for upcoming CTS tests that utilize the native_app_glue
framework to simplify native test apps.

In support of this feature:
https://code.google.com/p/android/issues/detail?id=63920

Change-Id: I3fe5dab26c147636538a4b519683493d8e78d26f
2013-12-26 15:39:36 +00:00
Logan Chien
ad40d952a1 Workaround the __builtin_isnan() type error for clang 3.4.
Similar to clang 3.3, it seems that clang 3.4 declares an incompatible
function prototypes for __builtin_isnan().  To workaround this issue,
we should not declare the function prototype for __builtin_isnan().

Note: Though it may be good to fix this in clang type checker, like
__builtin_nexttoward(), however it seems non-trivial since __builtin_isnsn()
might be overloaded.  We can revert this after we have fixed the
clang builtin definition.

Change-Id: I329b56225f3d229b0c141bb8414c4369f154efda
2013-12-25 01:59:29 +00:00
David 'Digit' Turner
db275132c5 ndk: Fix wait4() declarations
wait4() was incorrectly declared in <sys/wait.h>, but only added to the
C library in Android 4.3 (API level 18) [1]

This patch:

- Removes the wait4() declarations for any <sys/wait.h> header before
  API level 19.

- Brings the API level 19 <sys/wait.h> which correctly declares wait4().

- Update the libc.so.functions.txt for API level 19 of all platforms
  to include the exported symbol.

NOTE: This does not bring the static libc.a to API level 19, which means
      it is stuck at API level 9 for ARM.

See [2] for the corresponding NDK tests.

http://b.android.com/19854

[1] 17a8b0db63
[2] https://android-review.googlesource.com/#/c/72000/

Change-Id: I7735473d177c44f43b09bb6738e9914945cd4d0a
2013-12-11 17:23:46 +01:00
Andrew Hsieh
b05e7c1985 Annotate JNICALL with __NDK_FPABI__
In armeabi-v7a, VM still expects JNI functions to follow soft-abi.
Annotate it with __NDK_FPABI__ so compiler follows soft-abi in JNI
functions regardless the presence of -mhard-float in command-line.

It's up to developer to apply JNICALL consistently on JNI functions,
ie. those functions whose first arg has type "JNIEnv*" is likely to be

Change-Id: Ica7cca8ab9498ce00de6ffc7fff35f8cc13aedbf
2013-12-04 11:55:17 +08:00
Andrew Hsieh
2a571fda2b Fix -mhard-float for calling __builtin_* math functions
Annotate __builtin math functions with __NDK_FPABI_MATH__ too.
1. __attribute__((pcs("aapcs"))) has no effect on codegen when __buitlin
   function is emitted inlined.
2. When __builtin call into regular function in Android's libm, it has
   proper attribute which observes soft float-abi

Change-Id: I11e8b74fc22f3072b9ce849193e4a56e98c92d64
2013-12-04 11:45:04 +08:00
Andrew Hsieh
833979268e Enhance hello-jni to report APP_ABI at compilation
Change-Id: I24989212cfb729705cc4177a7112804fa68144c4
2013-12-02 10:22:47 +08:00
Hak Matsuda
cc69f210a7 - Using hard-fp
- Immersive mode in android-19
- Fixed local reference release in JNI helper
- Misc fixes
Change-Id: I3ab19c2b66648bb7a011c462d9d98e75bc136ce6
2013-11-21 16:06:02 +08:00
Elliott Hughes
dfb6545c6b MIPS hasn't supported SA_RESTORER since 2.5 kernels.
Change-Id: Ia3500168ab5ba5ba381d0195e9ecc26a618bf505
2013-11-20 11:34:53 -08:00
Andrew Hsieh
a2e8997b9f Update time.h for CLOCK_BOOTTIME, etc
Add CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE,
CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, and CLOCK_BOOTTIME_ALARM

Remove obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR

See:
0351955a686fe4e0bf9f30780f78ff0e2402a6b0
b928bda83d4413b703329f607e2706602f15293f
60e5144ca312b210b54ac8e6966108da0c97ff80

Change-Id: Ibc9e297ab71f3dc16eec0746f835f89e554fd68b
2013-11-14 12:14:12 +08:00
Andrew Hsieh
cd3fe9b4b2 Added missing clock_settime()/clock_nanosleep() in time.h API>=8
See patch for API < 8 at 7761beeb56.

Change-Id: I906172a34645e2659a5b9f8acb2652a4b4eb857d
2013-11-14 11:57:04 +08:00
Andrew Hsieh
7e967a1ca4 Add utimensat and futimens to libc.so at API level 12 and 19, respectively
See ae2d5ba31412c4f382ef405000baa866f35dd736 and
d0be7c8f9a06b3ca8ea7647ea35c8f9dc63f0fe1.

Internal BUG 11590144

Change-Id: I76119cd20fdb205728482e682fd1206d1305881d
2013-11-11 14:50:50 +08:00
Andrew Hsieh
d0b6889fd1 Merge "<pthread.h>: Mark pthread_exit() as __noreturn" 2013-11-05 00:40:09 +00:00
Andrew Hsieh
db52487969 Merge "Remove obsolete ndk/platforms/android-9/arch-x86/src/__dso_handle*.S" 2013-11-05 00:39:50 +00:00
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