Commit Graph

137 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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