Commit Graph

248 Commits

Author SHA1 Message Date
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
Andrew Hsieh
c4e201a35c Added struct Elf32_auxv_t and Elf64_auxv_t
See https://code.google.com/p/android/issues/detail?id=38441

Change-Id: If06ec47d4e15639461c044248e3fe0020748b305
2013-03-13 19:21:56 -07:00
Andrew Hsieh
c21a505044 Fix warnings in sample detected by NDK_ANALYZE=1
Change-Id: I999a96fb3de5225adde91eb014170ffd7b6092f6
2013-02-01 11:14:28 -08:00
Sergey Melnikov
e3b1ac14bd stdint.h header is not fully compatible with C99(ISO9899:1999)
1. stdint.h doesn't provide macros:
  * SIG_ATOMIC_MIN
  * SIG_ATOMIC_MAX
  * WCHAR_MIN
  * WCHAR_MAX
  * WINT_MIN
  * WINT_MAX
2. stdint.h provides macros with incorrect type:
  * UINT8_C
  * UINT16_C
  * UINT8_MAX
  * UINT16_MAX

Change-Id: I3f4da907eaee8f46d8eb956950230ca2eb04a3ea
Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com>
2013-01-17 09:58:16 +04:00
Andrew Hsieh
bbff7fbd64 Sync stddef.h
To be the same as bionic's.  See
ec37237d69289e2bb9836bfa0d071ab958234d00

The new one also no longer undef offsetof and replaces it with
"((size_t) &((TYPE *)0)->MEMBER)" if __compiler_offsetof isn't
defined.  The problem with the old behavior are that
1. __compiler_offsetof isn't defined in linux/compiler.h even though
   all Android compilers support __builtin_offsetof
2. As as result, offsetof defined in stddef.h to use __builtin_offsetof
   is undefined and replaced here.  Problem is,
   "((size_t) &((TYPE *)0)->MEMBER)" isn't considered a compile-time
   constant, and fails some code expect offsetof to be.

Change-Id: I3ebb0de9e1d95305a0890a099360ff6936d24b2f
2013-01-09 17:33:13 +08:00
Andrew Hsieh
7d6e479464 Merge "Sync MIPS fenv.h" 2013-01-08 18:06:48 -08:00
Andrew Hsieh
ec20b2d476 Fix san-sangeles warnings with clang 3.1
about implicit declaration of functions appInit, appDeinit,
appRender, and importGLInit

Change-Id: Iaaaa49dd8de0e82bcb59be0b08cb490647f06dde
2013-01-08 19:15:07 +08:00
Andrew Hsieh
253d234a29 Sync MIPS fenv.h
See d199017101dd124204fb949e46adb68a43e4785b

Change-Id: I657a8a4df26868bcf9cdab0dc0063c56bc085a85
2013-01-08 10:59:06 +08:00
Andrew Hsieh
8e84a15fed Merge "Sync sys/limits.h and sys/sysconf.h" 2013-01-03 10:34:13 -08:00
Andrew Hsieh
75d889ea23 Sync sys/limits.h and sys/sysconf.h
See http://code.google.com/p/android/issues/detail?id=39680
and a55f63083fb16b2595f517a3260083e5f8cddd02

Change-Id: I2d1548814eb771c26b540f5fee57dabf54fcfdd6
2013-01-03 12:28:48 +08:00
Andrew Hsieh
d693e84421 Sync fenv.h
See See 0f7809d5c364565e210554ca2b5d8eedf8a57ec7
90e10d41c4271a5d517f60f4ff1d2891b8ccc034

Change-Id: Id59b6c24f74f03f7d4b0c420fdb59fb2ab98be0d
2013-01-03 12:12:39 +08:00
Andrew Hsieh
54e2794aba Add binaries to bootstrap GCC build with OpenMP
With --enable-libgomp, gcc/gcc-4.4.3/libiberty/configure line #2124 tries
to link a trivial program but fails w/o the presence of libc.so and libdl.so
and sets "gcc_no_link=yes" at line #2131.  Confiugre later fails with
cryptic message reads "Link tests are not allowed after GCC_NO_EXECUTABLES."

See
  https://android-review.googlesource.com/#/c/34491, 48617, and 48619

Change-Id: I6e761c5fb12f413dca04a26b39f27e9f026d75d3
2012-12-26 15:11:56 +08:00
Andrew Hsieh
7c9e2c6851 Fix wint_t in android-3 and android-8 to be consistent with android-9
Change-Id: Ia36557bfc6d1155ba8106c26bb3fd3c226ad779e
2012-12-24 14:14:55 +08:00
Andrew Hsieh
7980acf254 Remove duplicated definitions of size_t and ssize_t
See 3975cec694a0c9b42e3f7e671fcd678da92836c3

Change-Id: Ia40ff8de3ffe923fb983bb116b740942724c641a
2012-12-21 22:29:26 +08:00
Andrew Hsieh
9ca4e48605 Sync pthread.h and resolv.h
See 9831ad3ce6bd5b22da16a275ed67e7236eae3d1f and
23d3e6b21b4b6debff87da8c6558495e564cc38e

Change-Id: I22c7bbda1cd763e5f67410cc2e4054292e71af04
2012-12-20 19:08:54 +08:00
Andrew Hsieh
e4b3c7a31d Merge "Correct typo" 2012-12-12 15:02:04 -08:00
Andrew Hsieh
d30385fc7c Correct typo
Change-Id: I150ee24f93d1a4fe16de938dafb335a9f1a171b0
2012-12-12 10:34:21 +08:00
Andrew Hsieh
ab13dd0e7a Fix <endian.h> and <sys/endian.h>
See 4fa35d8ae80c175425e9525831d7b6a71a3ada60

Change-Id: Ia14386f2e762fd7c0a1fc8f3e7cf8c0ce05b1dd5
2012-12-12 10:04:53 +08:00