Commit Graph

245 Commits

Author SHA1 Message Date
Jean-Baptiste Queru
44039c689e am f987c05c: am 9ce69a5f: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"
* commit 'f987c05c776918d121b7e2095a232e4854fde8a8':
  Make sure __u64 is defined even for strict ansi or -std=c99
2012-02-13 14:29:58 -08:00
Scott Main
41b5bb95c3 docs: fix minsdkversion for native activity sample
Change-Id: I2d45207182f6a5b1743b574f7ab10251efd3a17a
2012-02-09 12:10:27 -08:00
Martin Storsjo
6dd4b91b32 Make sure __u64 is defined even for strict ansi or -std=c99
The x86 asm headers define __u64 regardless of __STRICT_ANSI__.
The linux/videodev2.h header requires __u64 to be defined, thus
this fixes compiling with -std=c99 when including the
linux/videodev2.h header.

In glibc, the asm/types.h header defines __u64 regardless of
__STRICT_ANSI__.

This commit copies the updated header from bionic into the ndk
platform headers.
2012-01-27 17:54:02 +02:00
David Turner
689885684d Merge "Add README.txt for missing example" 2011-10-20 04:01:23 -07:00
Glenn Kasten
ccdb9cb2b0 Update native-audio example app
Additions:
 - volume
 - stereo position
 - mute / solo
 - explicit pause / play / loop buttons
 - spinner for URI strings

Change-Id: I92f3a191f715567531d03998d4b80e32cc9aceed
2011-10-19 17:28:37 -07:00
Glenn Kasten
bd690d7cd2 Add README.txt for missing example
Change-Id: I88236a3953f6b62f8b3c6f80ecd5a94608c9296e
2011-10-19 15:15:56 -07:00
David Turner
207118ad6d Merge "Replace match_parent with fill_parent; Declare importGLInit() and importGLDeinit() regardless DISABLE_IMPORTGL (otherwise compiling in c++ may fail)" 2011-10-18 01:46:40 -07:00
David 'Digit' Turner
8ece910f60 ndk: Update OpenSLES platform files for API level 14
Change-Id: I029b7eea0db05613389e8cd22b0440a56c850d53
2011-10-14 02:29:28 +02:00
David 'Digit' Turner
3a195fe3c5 Merge "ndk: Add OpenMAX headers and symbols for API level 14" 2011-10-13 16:54:06 -07:00
David 'Digit' Turner
2c4b4c1a3d ndk: Add OpenMAX headers and symbols for API level 14
Change-Id: I61f6f255357781d1912e25bd43815fd34ff83d0e
2011-10-14 01:52:11 +02:00
David 'Digit' Turner
7761beeb56 ndk: <time.h> Add missing clock_settime()/clock_nanosleep() declarations
Both functions are part of the C library since Android 1.5 / API level 3
but were missing a declaration in <time.h>, so add then here

+ Fix first parameter from 'int' to 'clockid_t' for clock_getres()
  and clock_gettime()

Fixes http://code.google.com/p/android/issues/detail?id=20140

Change-Id: Ic2191d5eb54475c149b9a6b8f3ba55bc8ed4643f
2011-10-12 03:43:29 +02:00
David 'Digit' Turner
085e2b14d5 ndk: remove obsolete libthread_db.a binaries
We don't use these since NDK r5, since we now provide
customized versions of the library under
$NDK/sources/android/libthread_db

Change-Id: I2e3103b85c14e75a00ba9cece7a872d2156f5ef9
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
0d7f537fea ndk: Refresh EGL/GLES Khronos headers
This patch updates the Khronos headers with updated version.
This mostly brings definitions (constants and types) related to
a bunch of new extensions. Since each extension is optional and
must be actively probed at runtime by the client program, this
doesn't change the NDK ABI at all. Moreover, which extension is
available depends on the specific hardware, not the Android system
version.

+ Define GLchar and GLvoid and adjust function signatures to
  use them instead of 'char' and 'void'

List of new extensions supported:

GLES 1.x
--------
GL_OES_vertex_array_object
GL_OES_EGL_image_external
GL_APPLE_texture_2D_limited_npot
GL_EXT_blend_minmax
GL_EXT_discard_framebuffer
GL_EXT_multi_draw_arrays
GL_EXT_read_format_bgra
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_lod_bias
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_env_enhanced_fixed_function
GL_IMG_user_clip_plane
GL_IMG_multisampled_render_to_texture
GL_NV_fence
GL_QCOM_driver_control
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_perfmon_global_mode
GL_QCOM_writeonly_rendering
GL_QCOM_tiled_rendering

GLES 2.0
--------
GL_OES_element_index_uint
GL_OES_get_program_binary
GL_OES_mapbuffer
GL_OES_packed_depth_stencil
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_float_linear
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_array_object
GL_OES_EGL_image_external
GL_AMD_program_binary_Z400
GL_EXT_blend_minmax
GL_EXT_discard_framebuffer
GL_EXT_multi_draw_arrays
GL_EXT_read_format_bgra
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_compression_dxt1
GL_IMG_program_binary
GL_IMG_read_format
GL_IMG_shader_binary
GL_IMG_texture_compression_pvrtc
GL_IMG_multisampled_render_to_texture
GL_NV_coverage_sample
GL_NV_depth_nonlinear
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_writeonly_rendering
GL_QCOM_tiled_rendering

EGL:
----
EGL_ANDROID_recordable
EGL_NV_system_time

Change-Id: I26ae2aeb499539017cc35d0271f13bcfbf6f8a65
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
c63ce7a143 ndk: remove obsolete <android/api-level.h> headers
These are now auto-generated by the gen-platforms.sh NDK script

Change-Id: I5a38e956b58a34c5db96e24f2a46bc1ca1554376
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
4fee0994c3 ndk: Fix GB x86 definitions for libm.so
The previous header and implementation were incorrect and didn't produce
correct results. This has been fixed in the internal Gingerbread branch.

Technically, this could result in ABI breakage, but the chances are very
low, and there are no official x86 Gingerbread release yet.

Change-Id: I0b2d857399358775d1490b72a1b75baac362f839
2011-10-12 03:07:47 +02:00
David 'Digit' Turner
985433be6c ndk: Remove obsolete API level 11 platform files
Change-Id: I95b0952722e1312c46ef02912407b81ea8c1b198
2011-10-10 21:52:17 +02:00
David 'Digit' Turner
e872f4e101 ndk: Remove obsolete platform files
Remove the prebuilt system shared libraries and unified symbol files
from development/ndk. We don't need them anymore:

  - the unified symbol files are replaced by separate functions/variables
    symbol list, which were added in a previous commit, i.e.:

	libc.so.txt  --> libc.so.functions.txt
	                 libc.so.variables.txt

 - the shared libraries are now generated on the fly by the NDK
   gen-platforms.sh script, from the functions/variables symbol lists.

Note that we need to keep the static libraries and runtime objects,
they are required to build the cross-toolchains and target binaries.

Change-Id: Ifa0a7f2d741ed32b80216561ca3f17e67df06ce9
2011-10-10 21:52:17 +02:00
David 'Digit' Turner
02053eb7a1 ndk: separate functions and variables symbol lists
This change introduces separate symbol lists for functions
and variables of each NDK system shared library.

Note that we don't remove the unified symbol files yet. This
will be done later when we complete other changes under ndk/,
namely the ability to generate platforms trees containing shell
libraries generated directly from them.

These files were generated using the following:

  cd development/ndk
  for DIR in platforms/*/*/lib; do
    for ARCH in arm x86; do
      $NDK/build/tools/gen-system-symbols $DIR $DIR/../symbols
    done
  done

This means that the symbol lists were generated by parsing the
existing prebuilt shared libraries under platforms/ and extracting
their function and variable names.

Change-Id: Ie1e791d98260a7f0d8d2e9f71323a7ea448f2dd4
2011-10-10 21:52:09 +02:00
Andrew Hsieh
7a1175701b Replace match_parent with fill_parent; Declare importGLInit() and importGLDeinit() regardless DISABLE_IMPORTGL (otherwise compiling in c++ may fail)
Change-Id: I6ed8bcbfe6d0500f2f0564e3dd06e2b6aafa35ff
2011-09-01 13:34:05 +08:00
David 'Digit' Turner
aa109fa96d am 7e901892: am c40f3ba4: am 3ee119cd: Merge "ndk: update JNIEXPORT declaration in <jni.h>"
* commit '7e901892af103efd41a3967d67063df988c3ebd7':
  ndk: update JNIEXPORT declaration in <jni.h>
2011-08-24 09:27:58 -07:00
David 'Digit' Turner
7e901892af am c40f3ba4: am 3ee119cd: Merge "ndk: update JNIEXPORT declaration in <jni.h>"
* commit 'c40f3ba4c6dfb84a4918c8ec7c721d307fdad02b':
  ndk: update JNIEXPORT declaration in <jni.h>
2011-08-24 09:23:40 -07:00
David 'Digit' Turner
bb3784d646 ndk: update JNIEXPORT declaration in <jni.h>
This patch updates the definition of JNIEXPORT in <jni.h> to
use the "default" ELF visibility attribute for JNI_OnLoad and
any function that uses the macro for its definition.

This is handy when a developer wants to use hidden visibility
by default by using a compiler flag like -fvisibility=hidden
in its Android.mk or custom build script.

Change-Id: I95112932731216a9a4986820a1875edfb3f52e5b
2011-08-23 16:08:17 +02:00
David Turner
5647257e6e am 3374f8ad: am 254a7090: am 0f97bab8: Merge changes Ibee74a22,Ifef4dc98
* commit '3374f8ad2cd4fcff7ab40bd80672b8b380242c84':
  NDK: x86 header file has incorrect definition for ptrdiff_t
  Fix size_t definition in x86 NDK header file
2011-08-09 13:37:17 -07:00
David Turner
3374f8ad2c am 254a7090: am 0f97bab8: Merge changes Ibee74a22,Ifef4dc98
* commit '254a709075bc78250b28d8dc34e859821d6499b6':
  NDK: x86 header file has incorrect definition for ptrdiff_t
  Fix size_t definition in x86 NDK header file
2011-08-05 08:02:33 -07:00
Mark D Horn
f907f4f9d4 NDK: x86 header file has incorrect definition for ptrdiff_t
See Bug http://code.google.com/p/android/issues/detail?id=19042

Change-Id: Ibee74a22ca8cb1e62b7a6faff01291c6c7a56775
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2011-08-04 17:11:15 -07:00
Mark D Horn
36f0d56517 Fix size_t definition in x86 NDK header file
Bug: http://code.google.com/p/android/issues/detail?id=19011

The incorrect #define was being used which caused the incorrect
definition for size_t when the standalone toolchain is used.

Change-Id: Ifef4dc987c542a9c5d8bb43d84d3fe1431de9aa0
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2011-08-03 15:11:56 -07:00
David 'Digit' Turner
e8ceb3f0b6 am 16a7447e: am d681f257: am bb2c6132: am 718e8b89: Merge "ndk: arm: also update other CRT runtime objects."
* commit '16a7447e3f2ee49dc23729fb20a3077d37fd2440':
  ndk: arm: also update other CRT runtime objects.
2011-07-15 14:12:19 -07:00
David 'Digit' Turner
16a7447e3f am d681f257: am bb2c6132: am 718e8b89: Merge "ndk: arm: also update other CRT runtime objects."
* commit 'd681f257aa47dc643db5222796e9a2ce7ed42437':
  ndk: arm: also update other CRT runtime objects.
2011-07-15 11:21:55 -07:00
David 'Digit' Turner
26f4ec6044 am 6b44056d: am 6e837041: am 09d3d318: am c13e5c1c: Merge "ndk: Fix android-3/arch-arm crt{begin,end}_so.o"
* commit '6b44056dcffed6ac23140969b60257fdfd82b1ac':
  ndk: Fix android-3/arch-arm crt{begin,end}_so.o
2011-07-15 11:20:57 -07:00
David 'Digit' Turner
04a343244f am ecab2abe: am 0663014f: am 75266abb: am 0db3eb4a: Merge "ndk: Add crtbegin_so.o / crtend_so.o to android-3"
* commit 'ecab2abe5ed7aa2696aae08a7678a982ffcc9347':
  ndk: Add crtbegin_so.o / crtend_so.o to android-3
2011-07-15 11:20:54 -07:00
David 'Digit' Turner
6b44056dcf am 6e837041: am 09d3d318: am c13e5c1c: Merge "ndk: Fix android-3/arch-arm crt{begin,end}_so.o"
* commit '6e83704102ef91e3e8d217be2b8906a746c54d9a':
  ndk: Fix android-3/arch-arm crt{begin,end}_so.o
2011-07-15 10:47:20 -07:00
David 'Digit' Turner
ecab2abe5e am 0663014f: am 75266abb: am 0db3eb4a: Merge "ndk: Add crtbegin_so.o / crtend_so.o to android-3"
* commit '0663014fef1f9f7b44386a5f6fde97bd8fe9e452':
  ndk: Add crtbegin_so.o / crtend_so.o to android-3
2011-07-15 10:47:16 -07:00
David 'Digit' Turner
cd181903b5 ndk: arm: also update other CRT runtime objects.
Turns out that updating crtbegin_so.o and crend_so.o is not
enough for the standalone toolchain. We also need to update
the object files used to generate static and dynamic
executables.

This fixes the standalone toolchain NDK tests.

Change-Id: Ibf113b09766f00b30895951a5639343728be3f3a
2011-07-15 05:21:36 +02:00
David 'Digit' Turner
a062ad61b0 ndk: Fix android-3/arch-arm crt{begin,end}_so.o
Turns out that the previously commited versions of these files do not
allow for proper linking with a patched toolchain. With -shared, gcc complains
that:

    .preinit_array section is not allowed in DSO

So use the versions from android-9/arch-arm instead, which seems to work fine.

Change-Id: I9aeaab449ddad058451c7d6493c983ab2ed1c4eb
2011-07-14 08:15:16 +02:00
David 'Digit' Turner
75cedfadcd ndk: Add crtbegin_so.o / crtend_so.o to android-3
This change adds crtbegin_so.o and crtend_so.o under
platforms/android-3/arch-arm/lib.

This is in preparation of another toolchain patch that will require
these files for all platform versions (for now, they are only defined
starting from android-9).

Note that these files are just copies of the existing ones, named
crtbegin_dynamic.o and crtend_android.o respectively.

The NDK build script will automatically use the new files if it finds
them, so shouldn't need to be updated.

Change-Id: I6a446266b54b871cd957dfd737054b302678b2d3
2011-07-14 05:51:31 +02:00
David 'Digit' Turner
e89c5e20a0 am 5853cce9: am 97c9b03f: am a6896d75: am 402b02f8: Merge "ndk: x86: Update android-9 x86 platform files"
* commit '5853cce9d0a28ff4ee64909af86dc40e1639e9b8':
  ndk: x86: Update android-9 x86 platform files
2011-06-27 14:15:43 -07:00
David 'Digit' Turner
5853cce9d0 am 97c9b03f: am a6896d75: am 402b02f8: Merge "ndk: x86: Update android-9 x86 platform files"
* commit '97c9b03f62cc7d1102d5f4803bb8ed2b511ed060':
  ndk: x86: Update android-9 x86 platform files
2011-06-27 10:53:27 -07:00
David 'Digit' Turner
2409c5a6d7 ndk: x86: Update android-9 x86 platform files
This updates the platform files for API level 9 on x86 to
the binaries built from the internal Gingerbread branch
containing the back-ported AOSP x86 support patches.

Change-Id: I5bc43b4a5c346f7fab8eb57289803edc0c0f2d75
2011-06-24 22:39:14 +02:00
David 'Digit' Turner
5ac5b707bb am b257bb8a: am e9c7386b: am e011bed4: Merge "ndk: x86: Sanitize platform headers and libraries."
* commit 'b257bb8ab4a18e6683aec64389305e179f6eb86b':
  ndk: x86: Sanitize platform headers and libraries.
2011-06-07 17:16:35 -07:00
David 'Digit' Turner
b257bb8ab4 am e9c7386b: am e011bed4: Merge "ndk: x86: Sanitize platform headers and libraries."
* commit 'e9c7386b0506f7c2f0bc258e3a899fcbe64adc3e':
  ndk: x86: Sanitize platform headers and libraries.
2011-06-06 17:30:49 -07:00
David 'Digit' Turner
6a517b0612 am 91641c03: am c1b7604a: am 18fc9b3e: Merge "ndk: Update libc.a to Gingerbread version."
* commit '91641c03b03d7c2a4e187fcb22615799314a8439':
  ndk: Update libc.a to Gingerbread version.
2011-06-02 18:52:26 -07:00
David 'Digit' Turner
91641c03b0 am c1b7604a: am 18fc9b3e: Merge "ndk: Update libc.a to Gingerbread version."
* commit 'c1b7604a096ca32513b04c322fce1a0c550de099':
  ndk: Update libc.a to Gingerbread version.
2011-05-29 08:59:31 -07:00
David 'Digit' Turner
3e1498c4c4 ndk: x86: Sanitize platform headers and libraries.
This change sanitizes the x86-specific platform headers and libraries.
It does two things:

- Remove the stuff under android-3/arch-x86

- Update the content of android-9/arch-x86 from a recent AOSP
  full_x86-eng build (see caveats below).

Some files appear to move because they didn't change (e.g. kernel headers).

This change was generated by following these steps:

1/ Build full_x86-eng from the AOSP tree

2/ From $ANDROID_ROOT/ndk, run:

   build/tools/dev-system-import.sh --direct --arch=x86 9

3/ Under $ANDROID_ROOT/development/ndk, do:

   git rm -r android-3/arch-x86
   git add android-9/arch-x86
   git checkout -- android-9/include
   git ls-files -o | xargs rm
   git commit

IMPORTANT:
   The AOSP tip-of-tree used to generate these files
   includes post-Gingerbread changes !!

   The final version of the android-9/arch-x86 files will have to
   be generated from the gingerbread branch after we back-port all
   x86-support changes to it.

   These binaries are thus not final, but can be used to generate
   working experimental NDK packages, including prebuilt GNU libstdc++
   and STLport binaries that implement -fstack-protector correctly.

Change-Id: I260896185a098b9b356bd26f492692e4a4f66f8f
2011-05-27 06:14:16 +02:00
David 'Digit' Turner
509176259d ndk: Update libc.a to Gingerbread version.
This updates the static C library version provided with
the NDK to the version from the AOSP gingerbread-release
branch, more specifically using the platform/bionic.git SHA1 of:

    3f14ff34dfbd00fcffb18b10a1a3e17e2cc5ebdf

This file is only used to rebuild a gdbserver binary. This version
contains changes necessary to fix gdbserver crashing issues on
certain Honeycomb devices.

You will need to rebuild the NDK gdbserver binary after this patch
is submitted (see build/tools/build-gdbserver.sh --help).

Change-Id: Iab7ff707a9bdbdca0d0fd017178e25da9d48e43d
2011-05-24 03:56:38 +02:00
Iliyan Malchev
d78fc7acbc android_native_buffer_t -> ANativeWindowBuffer
Change-Id: I246690d0ecd83b6da8dc0abeff68887abd92fc92
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 15:49:31 -07:00
David 'Digit' Turner
74ca761b11 am 13e07e5c: am 28eeece2: am 755d75f4: Merge "ndk: Add missing update arm C library for android-9 platform."
* commit '13e07e5c66d20c95f7c8dd668f1e7d9d50da2c9c':
  ndk: Add missing update arm C library for android-9 platform.
2011-04-14 04:02:18 -07:00
David 'Digit' Turner
13e07e5c66 am 28eeece2: am 755d75f4: Merge "ndk: Add missing update arm C library for android-9 platform."
* commit '28eeece2152a6dd78bc630a6a0924ceb6921118a':
  ndk: Add missing update arm C library for android-9 platform.
2011-04-14 03:53:59 -07:00
David 'Digit' Turner
f76679f6ba ndk: Add missing update arm C library for android-9 platform.
The C library was updated in Gingerbread to support. The corresponding
headers were updated, but the change was missing an updated library,
used for proper linking of new functions (e.g. pthread_rwlock_init).

Fix for http://code.google.com/p/android/issues/detail?id=12990

For the record, this binary was simply pulled from an AVD created
with the standard SDK platform image for Gingerbread.

Change-Id: Ic30921582f143adfc4bcfe3f70a6293530fe0202
2011-04-14 11:44:04 +02:00
David 'Digit' Turner
773c80fdb1 am ffb13684: am 957b0ebe: am bfdff660: Merge "ndk: x86: Update libc.so and libstdc++.so"
* commit 'ffb13684024154fc98c27d32c40c090a4ea82e4e':
  ndk: x86: Update libc.so and libstdc++.so
2011-04-11 17:38:17 -07:00
David 'Digit' Turner
ffb1368402 am 957b0ebe: am bfdff660: Merge "ndk: x86: Update libc.so and libstdc++.so"
* commit '957b0ebeb15ec37059705558d10ab01505853738':
  ndk: x86: Update libc.so and libstdc++.so
2011-04-11 17:32:49 -07:00