Commit Graph

220 Commits

Author SHA1 Message Date
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
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
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
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
Andrew Hsieh
4ba2dd5080 Fix warning compiling samples with clang3.1
Change-Id: I166cc64d34dcf8dd99fc28f2556306b8795e3c7e
2012-12-06 18:10:46 +08:00
Andrew Hsieh
aa33ae38ae Merge "Refresh endian.h" 2012-12-05 21:28:13 -08:00
Andrew Hsieh
ef48154850 Fix a ENOTUP/ENOTSUP typo
See ecb53eab4b63a777c189f880e7f88ebbe0e8101b

Change-Id: Id0cd72f3ccc6e4ecb1bd57045e2f46be234378fa
2012-12-05 13:05:15 +08:00
Andrew Hsieh
7361c3c7bb Refresh endian.h
See http://code.google.com/p/android/issues/detail?id=39824
and b15c58bb0fe55f076751acd7a5d00ded0ec33963

Change-Id: I71858f6d15adb688e0b05685e55582f0f1ddae54
2012-12-05 12:42:18 +08:00
Andrew Hsieh
c45fca2926 Add missing SL_IID_ANDROIDBUFFERQUEUESOURCE in android-14 for ARM/X86
SL_IID_ANDROIDBUFFERQUEUESOURCE is new in android-14 and already
declared in platforms/android-14/include/SLES/OpenSLES_Android.h,
but it's missing from libOpenSLES.so

It turns out both *.functions.txt and *.variables.txt should exist
for gen-platforms.sh to generate new *.so.  Add *.functions.txt otherwise
development/ndk/platforms/android-14/arch-(arm|x86)/symbols/libOpenSLES.so.variables.txt
are ignored.  Note that MIPS is correct all along.

See http://code.google.com/p/android/issues/detail?id=40625

Change-Id: I826f13a93c9f3eaf648a59e7e844b53be5f7fba0
2012-12-04 20:23:41 +08:00
Andrew Hsieh
206315bc74 Merge "Bug: __WINT_TYPE__ and wint_t reference to different types" 2012-11-29 19:21:58 -08:00
Sergey Melnikov
02327e165a Bug: __WINT_TYPE__ and wint_t reference to different types
__WINT_TYPE__ type provided by gcc. It references to unsigned int
type for android and linux. Patch corrects wint_t typedef to
__WINT_TYPE__.

Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com>
Change-Id: Ib02a808283f91f17c1124fc9e304911659f4af74
2012-11-26 12:01:00 +04:00
Andrew Hsieh
1535354143 Merge "Correct typo" 2012-11-23 01:35:35 -08:00
Andrew Hsieh
6162d4e848 Correct typo
See http://code.google.com/p/android/issues/detail?id=15134

Change-Id: I3eeed151949086fa132dc258d43bee21eab4af9b
2012-11-23 17:01:06 +08:00
Andrew Hsieh
28464f3b51 Check the presence of __STDC_VERSION__ in <sys/cdefs.h>
See http://code.google.com/p/android/issues/detail?id=14627
and bea05255de

Change-Id: Ie990b7c1df91adab631634e6b68454e4c5bab19d
2012-11-23 12:53:04 +08:00
Andrew Hsieh
279fe064b1 Refresh header byteswap.h and dirent.h
Sync with bionic.  No new APIs.

Change-Id: Ie1f71d1c56ce2d0574d8b743f205115d2fbc68b4
2012-11-21 14:17:01 +08:00
Andrew Hsieh
2eb9332422 Fix limits.h to include page.h which provides PAGE_SIZE
See 6331db3fd251ddc350913cc1e8a7941740c25f63 and
http://code.google.com/p/android/issues/detail?id=39983

Change-Id: I85083d754fe9b722efcb8ea73f17d88d505c90d1
2012-11-20 16:14:06 +08:00
Andrew Hsieh
18fc7183ea Fix return type of glGetAttribLocation and glGetUniformLocation
from int to GLint.

See:
   https://android-review.googlesource.com/#/c/46120
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetAttribLocation.xml
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml

Change-Id: I57fa430be2987b41e31fb6b3bcefa5dfb58e63b9
2012-11-06 13:52:56 -08:00
Andrew Hsieh
1d35fba9bd Merge "ndk: Remove LONG_LONG_MIN/MAX hack from pthread.h" 2012-10-16 10:12:26 -07:00
David 'Digit' Turner
db5a5ada90 ndk: Remove LONG_LONG_MIN/MAX hack from pthread.h
The LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros. Move their declarations from
<pthread.h> to <limits.h> where they belong.

Change-Id: I597465b99893706ade82069238f60df73d8e236e
2012-10-16 09:49:10 +02:00
Andrew Hsieh
ed7dac09d8 Remove obsolete LOCAL_NDK_VERSION
Other than it's obsolete, it's outdated to use r4 (rather than the
most recently one)

Change-Id: I0a0dca663056a071a714d49a5d5bb77bd379c18a
2012-10-15 13:06:26 +08:00
Andrew Hsieh
d16812351b [ndk] Fixed sample SanAngeles to properly pause/resume
Previously re-launch of background SanAngeles app shows black or
freeze frame

Two fixes:
1. Not to reinitialize timer each time when DemoRenderer is created
2. Stop advancing internal clock when onPause(), and start when
   onResume()

Change-Id: I6bef9d7c462cd4d504e76099a4d28c8618043f46
2012-10-12 19:28:56 +08:00
Andrew Hsieh
24e005a234 am c7daea04: Merge "Replace __unused in linux/sysctl.h with __linux_unused"
* commit 'c7daea046b9f05fb07936bafd2f7436478781a2d':
  Replace __unused in linux/sysctl.h with __linux_unused
2012-09-26 15:48:00 -07:00
Andrew Hsieh
36ffaf5406 Replace __unused in linux/sysctl.h with __linux_unused
To avoid conflict with "#define __unused" in sys/cdefs.h

See
  https://android-review.googlesource.com/#/c/43479
  https://android-review.googlesource.com/#/c/43565

Change-Id: I6b8155570f4398b3ee8845d75bd231bca7f1d86f
2012-09-26 15:11:39 -07:00
Andrew Hsieh
47b1e0b6f7 am b07d7f6c: Merge "Update NDK headers"
* commit 'b07d7f6c25fe3ea99186c2cdb034449e75419518':
  Update NDK headers
2012-09-24 14:03:09 -07:00
Andrew Hsieh
c6427a73a2 Update NDK headers
Sync NDK headers with bionic's.  Most are new symbols.
The only big differences are in arch-mips/include/asm:

1) arch-mips/include/asm/unistd.h, see
   https://android-review.googlesource.com/#/c/40875
2) arch-mips/include/asm/*, see
   https://android-review.googlesource.com/#/c/43335
   https://android-review.googlesource.com/#/c/43440
   https://android-review.googlesource.com/#/c/43401

Change-Id: I8204f9b5f2f2c14a31dc28efc8a9d8c66cf73fe2
2012-09-24 12:31:43 -07:00
Andrew Hsieh
b034233afa am 3c901267: Merge "Update README.CRT.TXT"
* commit '3c901267609c17645999aa7a8ca95413ad528038':
  Update README.CRT.TXT
2012-09-24 09:28:50 -07:00
Andrew Hsieh
a0de803db8 Update README.CRT.TXT
Change-Id: I7d0ec48c09c47081c01c9366faf993317990b237
2012-09-21 18:50:16 -07:00
Andrew Hsieh
4102c6f241 am b833605a: Merge "Rewrite ARM crtbegin* as C files"
* commit 'b833605a2bf5c27ff57cf5508fc58bca351c2470':
  Rewrite ARM crtbegin* as C files
2012-09-06 18:30:03 -07:00
Andrew Hsieh
d0b834c7ad Rewrite ARM crtbegin* as C files
This is port of related CLs:
  9d40326830c2bd407427889c554adeb915ee6b4a
  f3cfcd869ded41d25c1f4f4e48e7c374a64f9583

Summary: By placing  __PREINIT_ARRAY__, __INIT_ARRAY__, __FINI_ARRAY__
and __CTOR_LIST__ on stack, this change allows PIC w/o relying on text
relocations.

Change-Id: I02a1b496b16aba692f4f9fa998a71efd943689fd
2012-09-06 15:27:56 +08:00
Andrew Hsieh
3bc200de51 am 9864b880: Merge "Replace deprecated APIs in NDK samples"
* commit '9864b8803782378159761424dee2270a12833872':
  Replace deprecated APIs in NDK samples
2012-08-30 08:23:48 -07:00
Andrew Hsieh
eb703bf543 Replace deprecated APIs in NDK samples
1. hello-gl2 from android-5 to android-7
2. native-activity from android-9 to android-10
3. native-audio from android-9 to android-10
4. native-plasma from android-9 to android-10

Related CL
  https://android-review.googlesource.com/#/c/42218, which
    adjusts android-10 to use android-9 header/lib

Related issue:
  http://code.google.com/p/android/issues/detail?id=20017

Change-Id: I49c4c0dd2cedb34522a9d196211ee96fce21b6c4
2012-08-30 13:02:53 +08:00
Andrew Hsieh
87485cd822 am fcc2452b: Merge "Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S."
* commit 'fcc2452b5102b412ba300243e0e9d26c827515cf':
  Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S.
2012-08-28 23:17:32 -07:00