Commit Graph

129 Commits

Author SHA1 Message Date
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
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
c21a505044 Fix warnings in sample detected by NDK_ANALYZE=1
Change-Id: I999a96fb3de5225adde91eb014170ffd7b6092f6
2013-02-01 11:14:28 -08:00
Andrew Hsieh
253d234a29 Sync MIPS fenv.h
See d199017101dd124204fb949e46adb68a43e4785b

Change-Id: I657a8a4df26868bcf9cdab0dc0063c56bc085a85
2013-01-08 10:59:06 +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
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
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
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
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
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
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
Chao-Ying Fu
75f8d8217e Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S.
Change-Id: I9b2d28c7c189d0f3a2ded694fadd0380cfd8e6e5
2012-08-28 13:21:42 -07:00
Andrew Hsieh
ef423edc2c am e3cfaa6d: Merge "Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS"
* commit 'e3cfaa6d4251136ad6f3221d881ac12786169663':
  Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
2012-08-21 03:27:39 -07:00
Andrew Hsieh
a5280d312d Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
Those are C funcitons

Change-Id: I8f481f29b278b8f28d9ce04635d0f04e9e148cb5
2012-08-21 10:41:51 +08:00
Andrew Hsieh
1148901643 am 7f26cea9: Merge "Update stdint.h; Refresh <arch>/include/machine/* stdint.h: https://android-review.googlesource.com/#/c/41714/ https://android-review.googlesource.com/#/c/40576/ <arch>/include/machine/*: to be consistent with bionic/libc/<arch
* commit '7f26cea9049c087b0552fb0f364ab6142a1ad227':
  Update stdint.h; Refresh <arch>/include/machine/*   stdint.h: https://android-review.googlesource.com/#/c/41714/             https://android-review.googlesource.com/#/c/40576/   <arch>/include/machine/*: to be consistent with      bionic/libc/<arch>/include/machine/*
2012-08-20 05:36:04 -07:00
Andrew Hsieh
bc95f91d24 am e33ad352: Merge "Remove linux-unistd.h"
* commit 'e33ad3528d23349a01113289272ffeff08106cf7':
  Remove linux-unistd.h
2012-08-20 05:36:02 -07:00
Andrew Hsieh
7305bb5363 am ed722f12: Merge "Replace link.h for mips with new version for all platforms"
* commit 'ed722f1242d330bd3fe29ff0793e4c616190ef2d':
  Replace link.h for mips with new version for all platforms
2012-08-20 05:36:01 -07:00
Andrew Hsieh
7f26cea904 Merge "Update stdint.h; Refresh <arch>/include/machine/* stdint.h: https://android-review.googlesource.com/#/c/41714/ https://android-review.googlesource.com/#/c/40576/ <arch>/include/machine/*: to be consistent with bionic/libc/<arch>/include/machine/*" 2012-08-20 05:22:01 -07:00
Andrew Hsieh
e33ad3528d Merge "Remove linux-unistd.h" 2012-08-20 05:21:26 -07:00
Andrew Hsieh
61a3e1462c Update stdint.h; Refresh <arch>/include/machine/*
stdint.h: https://android-review.googlesource.com/#/c/41714/
            https://android-review.googlesource.com/#/c/40576/
  <arch>/include/machine/*: to be consistent with
     bionic/libc/<arch>/include/machine/*

Change-Id: Ieeb44c3e864bf64c4cad4d3c9d94024a7b520181
2012-08-20 18:32:15 +08:00
Pavel Chupin
51d4794277 Replace link.h for mips with new version for all platforms
Update from bionic/libc/include/link.h
For details see https://android-review.googlesource.com/#/c/41705

Change-Id: Ib9e658aa0606584b148e951ad199dc12c2f563c2
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-08-20 10:48:23 +04:00
Andrew Hsieh
7de8e93107 Remove linux-unistd.h
Change-Id: I95cc89bfacb05d92da658fa533cb75ac65d397bf
2012-08-18 16:08:51 +08:00
Andrew Hsieh
1659906d5e Merge "Retire LOCAL_NDK_VERSION (DO NOT MERGE)" 2012-08-18 01:04:19 -07:00
Andrew Hsieh
8bb4fd7683 Update/Copy fenv.h
Update from bionic/libm/arm/fenv.h
Copy from bionic/libm/mips/fenv.h

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

Change-Id: I4cba9523ecc466720927798e461fc167d6d6df7c
2012-08-17 19:02:58 +08:00
Andrew Hsieh
b31b79830b Retire LOCAL_NDK_VERSION (DO NOT MERGE)
Change-Id: If37bcae0c5833f195e954a8bfbda6b8686b3705e
2012-08-17 07:17:31 +08:00
Andrew Hsieh
e395327a7c Add comments about why "call" instead of "jump" is used.
Related CL: https://android-review.googlesource.com/#/c/38651

Change-Id: I425e06f08fda90501a686c7e437d4e70fc1e4a1b
2012-07-25 15:39:00 -07:00
Andrew Hsieh
556182feb4 Fix SEGV when unwinding stack pasts __libc_init
Changed "jump __libc_init" to "call __libc_init" otherwise stack unwinding
past __libc_init may get wrong return address and crash the program or do
wield things.  With "call", return address is pushed on stack and unwinding
stops correctly at _start.  Note that __libc_init never returns, so this
fix wonʼt affect normal program execution.  But just in case it "does"
return, jump to address 0 and halt.

Change-Id: Id194fb32adcbf89ae59939cee33c50b5bbdd36fe
2012-06-28 14:28:21 -07:00
Andrew Hsieh
5e30a6ae14 ndk: Add crtbrand.c ; crtbegin_static.S includes "atexit.S" for x86/mips
"atexit" isn't defined in libc.a for x86/mips (unlike their arm's counterpart).
Include atexit.S otherwise app using atexit() may fail to link statically.

Also, add crtbegin.c to brand crtbegin_static/dynamic.c with .note.ABI-tag
section of given API level.  See $NDK/gen-platforms.sh

Change-Id: I2fdbb92119e3ca2da2c1ced6d77e63136ec35c34
2012-06-25 17:58:12 -07:00
David 'Digit' Turner
5e7c4e6a57 ndk: Remove prebuilt C runtime objects. Add sources instead.
This patch removes all prebuilt C runtime object files from
the ndk/platforms/ directory. We replace them with equivalent
assembly sources lifted from the following directories:

  bionic/libc/private/      (for __dso_handle.S and __dso_handle_so.S)
  bionic/libc/arch-$ARCH/   (for all others)

Note: This requires that your NDK's gen-platforms.sh script be
      capable of rebuilding the object files from sources.
      See https://android-review.googlesource.com/36822

The goal here is to make it much easier to update these files,
and track their changes relative to the content of bionic/lib.
For example to fix the following issues in the future:

Change-Id: If4c84e2584b0e58ca3585b034bb8a13a8add8ab9
http://code.google.com/p/android/issues/detail?id=26911
http://code.google.com/p/android/issues/detail?id=23203
2012-05-31 10:58:57 +02:00
Raghu Gandham
ae9a5f960c [MIPS] Import signal.h from bionic. This version fixes the
warning emitted by the toolchain
2012-05-02 18:46:58 -07:00
Andrew Hsieh
d0e65433d0 Fixed compilation error #include <android/*h>
Fixed compilation error when header in #include <android/*h> is
included alone.

Fix for rect.h already exists in $ANDROID/frameworks/native/include/android

Change-Id: I7c49e044507581c5ad591f26f99cda6870b411c5
2012-04-20 15:50:10 +08:00
Andrew Hsieh
dab6072046 Refresh development/ndk/platforms/android-9/arch-x86/include/machine
Apply changes in bionic/libc/arch-x86/include/machine to
development/ndk/platforms/android-9/arch-x86/include/machine:

   commit 5fbf2e09921723cfdea75e83c1fac2080f0ad564

Change-Id: Ie0fe711ae4c866d9c1300430d5e9613ccb82da22
2012-04-06 13:29:08 +08:00
David 'Digit' Turner
16c0f25354 ndk: ANativeActivity: Fix 'clazz' member documentation.
As discussed on android-ndk, the member is misnamed

Change-Id: I2a5a1c8dce327ddf9ab7a4d14f4e2fdf62808753
2012-04-03 19:30:08 +08:00
David 'Digit' Turner
e43487b854 ndk: android-9: Add missing <sys/eventfd.h> header
For some reason, the header was missing from previous NDK releases.
Note: the function symbols are properly listed in arch-$ARCH/symbols/libc.so.functions.txt
2012-04-02 18:05:57 +08:00