Commit Graph

209 Commits

Author SHA1 Message Date
Dimitry Ivanov
977bf48381 Remove symbols which are not in platform libm.so
Bug: http://b/26236057
Change-Id: I388100b14346bcf24eba12ad452f2e16676ee756
2016-01-13 17:32:12 -08:00
Dimitry Ivanov
8b554e7ec7 Remove symbols that are not in platform libc.so
Bug: http://b/26236057
Change-Id: Iefff94c4210732b695b77a58fb6f481d810811ee
2016-01-13 17:32:12 -08:00
Dimitry Ivanov
34109a7109 Remove LIBC_PRIVATE symbols from libm
Bug: http://b/26234924
Change-Id: I3b1b764f87e0b6be33c1e761ee883e1d07578323
2016-01-13 10:53:47 -08:00
Dimitry Ivanov
10936c3aa1 Restore bsd_signal for android-20 and below
Also fix sort order in couple of files.

Bug: http://b/26475271
Change-Id: I75775ded99edd313e9ea31f0b3b4de03096be482
2016-01-11 13:50:48 -08:00
Dimitry Ivanov
11ae5ebfb6 Replace __page_size reference with PAGE_SIZE for android-12 and below
Also remove __getpageshift since it is not present in later version of
android (>12)

Bug: http://b/26475272
Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I117194ede3b13a63ff020364b0f573fb25d5205d
2016-01-09 14:16:13 -08:00
Dimitry Ivanov
eb7c104c90 Add missing __gnu_Unwind_Find_exidx symbol
Also since __aeabi* and __gnu_Unwind_Find_exidx symbols
were incorrectly versioned in M (android-23) remove them from
the version script for all platform versions <= 23

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I04902aac25a722100fc502600df908bb3a786356
2016-01-08 10:03:09 -08:00
Dimitry Ivanov
4493909200 Remove bzero from libc.so
Bug: http://b/26234924
Change-Id: I946a836a55bf416a767dec4e04fb23bb4c00f8ec
2016-01-05 21:13:38 -08:00
Dimitry Ivanov
6bef207c7b Remove new set of LIBC_PRIVATE symbols from libc
Bug: http://b/26234924
Change-Id: If0acb2105c75bf9e6dd97230391f3944157990ae
2016-01-05 15:26:03 -08:00
Dimitry Ivanov
32b61f1e94 Restore public __aeabi symbols
The following arm symbols should be exported by libc.so:
    __aeabi_atexit; # arm
    __aeabi_memclr; # arm
    __aeabi_memclr4; # arm
    __aeabi_memclr8; # arm
    __aeabi_memcpy; # arm
    __aeabi_memcpy4; # arm
    __aeabi_memcpy8; # arm
    __aeabi_memmove; # arm
    __aeabi_memmove4; # arm
    __aeabi_memmove8; # arm
    __aeabi_memset; # arm
    __aeabi_memset4; # arm
    __aeabi_memset8; # arm

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I36f758c574a939174d43999048c193e63def548f
2016-01-05 14:04:48 -08:00
Dimitry Ivanov
450cb38561 Remove LIBC_PRIVATE symbols from all of NDK libcs
Bug: http://b/26234924
Change-Id: I1f4bb35df0bf0aca089a9f21d6d9b653cce001ff
2016-01-04 12:40:40 -08:00
Dan Albert
616a494ec1 Update endian.h from bionic.
This consolidates the guts of the three endian.h files (endian.h,
sys/endian.h, and machine/endian.h) into just sys/endian.h, and turns
the others into headers that forward to it.

This also consolidates all the architecture specific machine/endian.h
files into a single generic header.

Finally, this is also the update version of sys/endian.h, which just
forwards to compiler builtins rather than implementing it ourselves.

Change-Id: Ifce64dc684ce3d3231f3f43a94c083bbd8661840
2015-12-08 14:20:25 -08:00
Dan Albert
c57abe4eb2 Always use the newest sys/cdefs.h.
This is all macros, so there's no reason to have one per API level.

This is still quite a ways from matching what we have in bionic, but
that's a problem for another day.

Change-Id: I804edfd6299d9ba15a3ba59e1091f301eace2142
2015-12-08 14:19:48 -08:00
Andrew Hsieh
ece719c7f6 Fix end pointer size/alignment of crtend_* for mips64 and x86_64
Change-Id: I16fec92826cb42a2f68e2b910b8a67301d3eae28
2015-05-26 12:47:21 +08:00
Andrew Hsieh
29fe2de27d Fix mips/mips64 headers
Change-Id: Id65b3bd0c040df62710eee4f5d6571cb5667d57a
2015-05-26 12:33:29 +08:00
Andrew Hsieh
ba9952c429 Remove libthreads_db
Change-Id: I21f3ac64ac7ba15dbdc566fbb042ff9c42e16dd2
2015-05-26 11:23:38 +08:00
Andrew Hsieh
3598d53b42 Drop clang version check for __builtin_isinf and __builtin_isnan
This CL unconditionally removes the existance of __builtin_isinf and
__builtin_isnan from math.h for clang, because (unlike other math functions)
clang doesn't like those to be declared.

See LLVM bugzilla entry: http://llvm.org/bugs/show_bug.cgi?id=20958

The reason for decorating all math functions with __attribute__((pcs("aapcs")))
is to offer developers the ability to compile their code with hardfp and still
link Android's libm.so which follows softfp calling convention.

Before issue 20958 is fixed, those who want clang to compile their code with
hardfp in NDK has to go all the way hard, ie.
1) LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
   Note that _NDK_MATH_NO_SOFTFP=1 remove __attribute__((pcs("aapcs"))) for all math functions
2) LOCAL_LDLIBS += -lm_hard  # link libm_hard.a recompiled with -mhard-float instead of bionic libm.so

Change-Id: Ie2f95e73e58e1574e8cadbcab92a5209d94448e1
2015-01-16 14:24:04 -08:00
Andrew Hsieh
d3ab539366 Change sysconf(3) to return long
See bionic 60d84af1726225320b26683b726e5e735d9d76e8

BUG=18390956

Change-Id: I20c6aa48115610b35e1d59f9f37ce5abbe6ac2f7
2014-11-17 09:48:36 +08:00
Andrew Hsieh
da84168fb2 Rename android-L to android-21
Change-Id: I1e781b15a867cf6283756f35f2b5955c96637c39
2014-10-15 10:48:04 +08:00
Andrew Hsieh
ec2d5674a8 Merge "Bump up clang vesion accepting __builtin_isnan __attribute__((pcs("aapcs")))" 2014-09-29 01:20:12 +00:00
Andrew Hsieh
3dbef8fe11 Bump up clang vesion accepting __builtin_isnan __attribute__((pcs("aapcs")))
Upstream clang3.6 still doesn't allow change of calling convension of
__builtin_isnan from the default to "softfp" (via __attribute__((pcs("aapcs"))))
as required by bionic libm.so for 32-bit ARM.  Let's hope clang3.7
fix that.  See upstream bug http://llvm.org/bugs/show_bug.cgi?id=20958

Change-Id: Ibdcc1783ffa7cf2f36e733983bd6d912ad38df70
2014-09-26 16:20:56 +08:00
Andrew Hsieh
9eac1b60d3 Added sys/ucontext.h and sys/user.h to all API levels.
Also
1. Header singal.h now includes <sys/ucontext.h>
2. asm/user.h include sys/user.h
3. change use of user_i387_struct to user_fpregs_struct

See bionic 26a8eb50a84e131d34d10d5d167d67e9995399bd

Change-Id: I9592e98b90d773ef5babb428a6a6ef208fe86327
2014-09-19 15:50:12 +00:00
Andrew Hsieh
2db7f63f99 Fixed atexit()
See b.android.com/66595

Change-Id: I1d4c3db424c7f839e48756359cc095a6b1028ace
2014-09-04 13:17:25 -07:00
Andrew Hsieh
cc101e0860 Refresh 64-bit headers/libs (WW29)
Change-Id: Ifaee25e70db14327c6f8104b04bf3abd71493477
2014-07-19 16:03:48 +08:00
Andrew Hsieh
d10a35fe44 Update mipsel and mips64el multilib lib* and lib-bootstrap
Needed by:
  https://android-review.googlesource.com/#/c/101410
  https://android-review.googlesource.com/#/c/101022

Change-Id: Ia5f96fa2ee91984cba12983c9fb01a6b2e584209
2014-07-17 16:24:51 +08:00
Andrew Hsieh
458300640f Fix samples for 64-bit ABIs
1. Set APP_ABI:=all in almost all samples
2. Enhance hello-jni to report more ABIs
3. Fix warnings

Change-Id: I2851c42b77ef8225e32143d225edcf973633e782
2014-06-20 16:42:08 -07:00
Andrew Hsieh
2ae52388f3 Add missing mips64 lib-bootstrap
Such that the following can correctly populate sysroot just enough to rebuild
mips64el toolchain

  ./build/tools/gen-platforms.sh --minimal --dst-dir=$NDK --ndk-dir=$NDK --arch=mips64

Change-Id: Ib37516bfe4c4b6a0c5b479d7cec8764c161f02c8
2014-06-09 17:37:46 +08:00
Andrew Hsieh
f77a689ffd 64-bit mips64el-* multilib sysroot
Change-Id: I88fb4492d16eece4347589da75fe1ed2ed7d2254
2014-06-04 23:42:16 +08:00
Andrew Hsieh
e85f942ec6 Fix warning about undefined __LP64__
See b.android.com/69975

Change-Id: If7f2b6fa29c36221b1a0d31a334cb34cecb4e8bc
2014-06-02 14:44:19 +08:00
Andrew Hsieh
67dc50cbbb Merge changes Ie67acf11,Ia9c03558
* changes:
  Remove non-existanec functions/variables from libc.so
  Restore stdint.h for android-3..19 to the original headers
2014-05-16 03:17:19 +00:00
Andrew Hsieh
abc6d891a0 Merge "Update lib-boostrape for 64-bit libraries built with GCC toolchain" 2014-05-16 03:16:21 +00:00
Andrew Hsieh
1e61663835 Remove non-existanec functions/variables from libc.so
See b.android.com/69319

android-9+
  __evOptMonoTime
  _nres
  __p_default_section_syms
  __p_update_section_syms
  _rand48_add
  _rand48_mult
  _rand48_seed
  _res_opcodes
  __sFext

android-12+
  copy_tm_to_TM
  copy_TM_to_tm
  __dtoa
  _endhtent
  __fremovelock
  _gethtbyaddr
  _gethtbyname
  _gethtbyname2
  _gethtent
  __libc_android_abort
  _mktemp                 # mktemp already exist in header
  __pread64               # add pread64, pwrite64 and ftruncate64 to API >= 12
  __pwrite64
  res_need_init
  __res_ourserver_p
  _sethtent
  __set_syscall_errno
  __sfvwrite
  __timer_table_start_stop
  valid_tm_mon
  valid_tm_wday

android-14+
  __libc_android_log_assert
  __libc_android_log_print
  __libc_android_log_vprint

android-17+
  dlmalloc_walk_free_pages
  dlmalloc_walk_heap
  __get_pc

android-18+
  __get_res_cache
  __libc_init_common
  __libc_preinit

Change-Id: Ie67acf115427e808dde0e33411671b07a888a9b6
2014-05-12 19:22:17 +08:00
Andrew Hsieh
7986b0872e Fixes samples Teapot/MoreTeapots armeabi-v7a-hard; native-audio debug build
Fixes two issues:
1. Remove redundant check for hard-float in Teapot/MoreTeapots and ndk_helper
   they depend.  The ndk-build system add those flags already for armeabi-v7a-hard
2. native-audio in debug build: assert on the non-existance var

Change-Id: Id6b2d38a264c2f2d0e0c7fe625991fcee1762800
2014-05-12 15:53:37 +08:00
Andrew Hsieh
b1111100fc Update lib-boostrape for 64-bit libraries built with GCC toolchain
Change-Id: Icdc4bf924f660eb137e70ad80c91f68efd30824f
2014-05-12 12:04:58 +08:00
Andrew Hsieh
b280e72a97 Bump __clang_minor__ check to 6 for __builtin_isnan
It appears that upstream 3.5 still can't accept __builtin_isnan redeclared
with calling convention, eg.

cat > isnan.c <<EOF
int __builtin_isnan(double) __attribute__((pcs("aapcs")));
EOF

  clang  -target armv5te-none-linux-androideabi -c isnan.c
  isnan.c:1:5: error: function declared 'aapcs' here was previously declared without calling convention
  int __builtin_isnan(double) __attribute__((pcs("aapcs")));
      ^
  isnan.c:1:5: note: previous declaration is here

Change-Id: Iff466fd913c3deec27aa3ff355a208543028d368
2014-04-25 09:55:31 -07:00
Andrew Hsieh
fec8b6eb28 Update arch-x86/lib-bootstrap/lib64
Note that this is only used (symlinked) by android-20/arch-x86/lib-bootstrap
for x86_64 build

Change-Id: I9ab023b0383f406fd5b05debf2dd75ea9f2243d8
2014-04-24 12:26:29 -07:00
Andrew Hsieh
8326e0edba Update 64-bit headers/libs
Also
1) rename lib -> lib64
2) add src/ for android-20/arch-arm64 and arch-mips64
3) delete android-9/arch-arm64 and arch-mips64

Change-Id: I4958c4e52946e29e57b910f39ff0104200853a06
2014-04-10 15:28:53 -07:00
Andrew Hsieh
6db591b98c Merge "Directories/symlinks changes for x86_64 support" 2014-04-10 20:20:02 +00:00
Andrew Hsieh
497b94df02 Merge "Headers update from bionic for x86_64 support" 2014-04-02 08:21:49 +00:00
Andrew Hsieh
0123d3496a Merge "Move _types.h to 32-bit arch dirs to avoid impact on 64-bits" 2014-03-29 03:12:46 +00:00
Pavel Chupin
e54e92427d Headers update from bionic for x86_64 support
* Add i386/elf_machdep.h, it is used during the build of 32-bit part of
multilib compiler;
* Remove page.h. See https://android-review.googlesource.com/#/c/83299;
* Update other x86 headers from bionic for compatibility which are
required for successful build;

Change-Id: Ia66301849e699b79c657146424a806d0aa22342b
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-25 19:22:22 +04:00
Pavel Chupin
ac612d2495 Move _types.h to 32-bit arch dirs to avoid impact on 64-bits
This change moves _types.h from common area to all 32-bits archs.
Required for successful NDK build.

Change-Id: Ife676a285f4b77aef4c33e465a0dbc7cab1481a3
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-25 19:21:34 +04:00
Pavel Chupin
94006ac982 Directories/symlinks changes for x86_64 support
* Cleaned up obsolete link in android-9
* Add symlink to lib-bootstrap in android-9
* Add symlink to crt* files sources so that we can build crt*.o for x86_64
* Moved static libs from lib to lib64 so that they can coexist with 32-bit libs
and automatically picked up by multilib compiler. Just plain move, nothing
changes;

Change-Id: Iba580f59f0538db9bc8484afd10e9cfd8b53913a
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-25 19:11:40 +04:00
Pavel Chupin
fa5250051f Fix x86_64 alignment in crtbegin
Sync from bionic

Change-Id: Ic2b5f1cf87c4c89f75571f76b6a078990bfcb1e4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-03-21 15:23:07 +04:00
Andrew Hsieh
884081d929 Fix MIPS' struct stat
In NDK r9c MIPS' struct stat was incorrectly set to its 64-bit
counterpart for API >= 12

Change-Id: I75db78ac7654fad982430e6adbe4480828776051
2014-02-20 07:56:38 +08:00
Andrew Hsieh
2643554fa0 Move sys/cachectl.h up from mips-specific folder
It is only effective when compile with mips, although
development no longer has to check themselves

Change-Id: I7fb703170e1cc6bb2e6ea31109851a90a26eacb8
2014-02-10 09:28:47 +08:00
Andrew Hsieh
f0387da709 Merge "Rename arch-aarch64 to arch-arm64" 2014-02-06 22:57:34 +00:00
David Friedman
3b601c6550 Fixed apparent copy/paste mistake
Bug: 11634373

Change-Id: I44766217f414988bfd3be68043a4b80dd21554d8
2014-02-05 11:18:32 +08:00
Andrew Hsieh
4618dc6c2a Rename arch-aarch64 to arch-arm64
Build instruction:
  ./build/tools/download-toolchain-sources.sh /tmp/ndk-$USER/src
  ./build/tools/gen-platforms.sh --minimal --dst-dir=$NDK \
     --ndk-dir=$NDK --overlay --arch=arm64
  ./build/tools/build-gcc.sh /tmp/ndk-$USER/src $NDK \
     aarch64-linux-android-4.8 --try-64

Change-Id: Ieaac9908cd2121981e257113cb8d5d3575c8718e
2014-02-04 17:36:55 +08:00
Andrew Hsieh
ca34e29d94 Merge "Fix headers to be inclued alone" 2014-01-16 17:03:03 +00:00
Andrew Hsieh
42bb3bcadc Merge "Fix typo in comments in looper.h" 2014-01-16 17:02:47 +00:00