aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add __emutls_unregister_key function"Treehugger Robot2018-07-111-4/+7
|\
| * Add __emutls_unregister_key functionRyan Prichard2018-06-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the existing __attribute__((destructor)) function, unregister_emutls_key, with a function that something else must call explicitly. We don't want the pthread key deleted at program exit, because it's unnecessary and because it may delete the key before other tls-using cleanup code runs. Exposing __emutls_unregister_key allows limiting the cleanup to dlclose (e.g. by calling it only from crtbegin_so.c). Reset emutls_key_created so multiple calls to __emutls_unregister_key are safe. Bug: b/80453944 Test: manual Change-Id: I82d13614ae8042d0501fd2ca64f0ef6189669905
* | libgcc: work around old Bionic loader bugRyan Prichard2018-06-281-0/+24
|/ | | | | | | | | | | | | | | | | dl_iterate_phdr returns a 0 load_base for a PIE executable when it should return the address where the executable was loaded (e.g. the load base or load bias). Recalculate the load base when it is zero. This recalculation should work on any ELF file with a PT_PHDR segment -- it will calculate 0 for a non-PIE executable. The load base is added to an ELF virtual address to produce a run-time address. Recalculate it by subtracting the PT_PHDR's virtual address from its run-time address. Bug: https://github.com/android-ndk/ndk/issues/505 Test: manual Test: run NDK tests (./checkbuild.py && ./run_tests.py) Change-Id: I7de46c07a8b04e794b59f07b4d554238cfd6d5d9
* Delay emutls deallocation for one roundRyan Prichard2018-05-221-8/+41
| | | | | | | | | | | | | With Android/Bionic, delay deallocation to round 2 of 4. It must run after C++ thread_local destructors have been called, but before the final 2 rounds, because emutls calls free, and jemalloc then needs another 2 rounds to free its thread-specific data. Bug: https://github.com/android-ndk/ndk/issues/687 Bug: b/78022094 Test: manual Test: ./run_tests.py --rebuild --filter emutls-dealloc Change-Id: I01bd634d97b7d22161b5cc8ca71b3cb94064a03e
* gcc: backport an upstream patch to make it work with newer glibc.Yunlian Jiang2018-04-2410-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer glibc removes 'struct' tag from ucontext_t. Because of this, gcc failed to bootstrap with newer glibc. This patch from upstream fixes that. BUG=chromium:834385 TEST=sudo emerge sys-devel/gcc passes with newer glibc installed. commit 14c2f22a1877f6b60a2f7c2f83ffb032759456a6 Author: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Jul 4 10:22:56 2017 +0000 Use ucontext_t not struct ucontext in linux-unwind.h files. Current glibc no longer gives the ucontext_t type the tag struct ucontext, to conform with POSIX namespace rules. This requires various linux-unwind.h files in libgcc, that were previously using struct ucontext, to be fixed to use ucontext_t instead. This is similar to the removal of the struct siginfo tag from siginfo_t some years ago. This patch changes those files to use ucontext_t instead. As the standard name that should be unconditionally safe, so this is not restricted to architectures supported by glibc, or conditioned on the glibc version. Tested compilation together with current glibc with glibc's build-many-glibcs.py. Change-Id: I433dd983b8d18c538d96486f7362b953ece3bfb8
* [GCC] Fix #endif problem in libgcc/emutls.cCaroline Tice2018-02-051-1/+1
| | | | | | | | | | | | Currently in emutls.c 'emutls_key_created' is defined within part of an ifdef, but is accessed outside the ifdef, which can cause issues in builds where the ifdef is not taken. This CL moves the #endif to include the new function that accesses 'emutls_key_created' so that all references to it are within the defining if-def. Bug: b/72942688 Test: Fix tested in ChromeOS. Change-Id: Ic1d6760d116b63abaef18f95e38de42af30952e4
* [libgcc] Fix emutls.c to not leak pthread keys.Caroline Tice2018-01-191-0/+10
| | | | | | Bug:b/71814577 Test:Built toolchain w/change and successfully tested building both platform and kernel images with new toolchain for marlin (pixel) device. Change-Id: Ia0c6944ce1d78b5bd57d65f705a3f7a59c944202
* Unify ChromeOS and Android versions of GCC.Caroline Tice2016-02-263-3/+21
| | | | | | | | This CL updates Android's GCC to match ChromeOS's GCC (with appropriate patches applied in both places to make sure no cherry-picked changes are lost). Change-Id: I390140c449b0e5df9ee78a06268319c8c510302f
* Fix mingw build breakageAndrew Hsieh2015-08-061-0/+4
| | | | | | | 1) Add missing _GCOV_fopen if !__KERNEL__ 2) Use _fullpath Change-Id: Id10cedf85e9a3409c284b77321675f61d37e76c2
* Synchronize with google/gcc-4_9 to r224707 (from r214835)Yiran Wang2015-06-2919-527/+1950
| | | | Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
* Update MSA Support in MIPS GCC.Steve Ellcey2015-03-191-2/+6
| | | | Change-Id: Id87035be4552719dc05096bb98b49d4bed91a07a
* [gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch.Rong Xu2014-09-023-8/+17
| | | | | | Merge gcc-4_9 source r214745 from google/gcc-4_9 branch. Change-Id: Ie6fa0fd72f4b4eec3adc4db4bb922e652d1c2605
* [gcc-4.9] Merge svn r213650 from google/gcc-4_9 branchRong Xu2014-08-077-55/+1022
| | | | | | | Merge svn r213650 from google/gcc-4_9 branch. Tested with arm,x86,mips,arm64,x86_64,mips64 build in liunux/windows. Change-Id: I0c07f67d516074172aa393003eee664d01f2e0f2
* [4.9] Switch gcc-4.9 to use google/gcc-4_9 branch.Rong Xu2014-07-2921-393/+6688
| | | | | | | | | | | | | | This source drop uses svn version r212828 of google/gcc-4.9 branch. We also cherry-picked r213062, r213063 and r213064 to fix windows build issues. All gcc-4.9 patches before July 3rd are ported to google/gcc-4.9. The following prior commits has not been merged to google branch yet. (They are included in this commit). e7af147f979e657fe2df00808e5b4319b0e088c6, baf87df3cb2683649ba7e9872362a7e721117c23, and c231900e5dcc14d8296bd9f62b45997a49d4d5e7. Change-Id: I4bea3ea470387ff751c2be4cb0d4a12059b9299b
* Update GCC 4.9 to include mips32r6, mips64r6 and MSA changes.Steve Ellcey2014-07-033-8/+35
| | | | Change-Id: I136290865b137531d55321987818fc954a65f5d6
* [4.9] Refresh GCC 4.9 to the 20140514 snapshot.Ben Cheng2014-05-182-0/+15
| | | | | | For critical bug fixes including devirtualization and codegen. Change-Id: I8138d3dc408fc12db5eecb01d2753d39219712f2
* [4.9] aarch64: uncomment md_unwind_header; [4.8,4.9] aarch64: enable ↵Andrew Hsieh2014-04-291-2/+1
| | | | | | libatomic,libgomp Change-Id: I21bb83a2de8d27b465afb9d45440cd7966f837ee
* [4.9] Fix mips64el-linux-android-4.9 build with new android-20 headersAndrew Hsieh2014-04-221-0/+1
| | | | | | See 4c35ba7730db5b95bd1404e8a334b7c8e2a9834b Change-Id: I8633259421152fa4347c6ac85b628a5d7191d0e8
* [4.9] Always enable --eh-frame-hdr for static executableH.J. Lu2014-04-221-4/+7
| | | | | | | See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and 23e3137ee2897464b051599b85a09f130d3ad05d Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
* [4.9] Add stack unwinding directives for __aeabi_idiv0 in libgcc.aBen Cheng2014-04-222-0/+8
| | | | | | See e85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21 Change-Id: Ic62d25125387a48412c99fbb16e509b79091559d
* [4.9] Maintain default visibility for helper functions in libgcc.a.Ben Cheng2014-04-221-0/+10
| | | | | | See 68330d08ea4b3e32dbadcfae109508f386177e68 Change-Id: Icd2f323e66d689f62b61c9819b983f4a3bb13984
* [4.9] Fix ARM GCC fail to links code using 64-bit atomic built-inAndrew Hsieh2014-04-221-0/+4
| | | | | | See 18f0873ec950f1496e55c2bd68b9debd1b0bb4ce Change-Id: Ibfadd5a581a7002752902ace324c96d9415bc64a
* [4.9] GCC 4.9.0 official release refreshBen Cheng2014-04-223-1/+17
| | | | Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
* [4.9] Apply aarch64 patches for Android toolchain build.Ben Cheng2014-04-021-1/+2
| | | | | | | | | | - The changes in gcc/config.gcc and gcc/config/aarch64/aarch64-linux.h will be upstreamed. - libatomic is disabled for now. - md_unwind_header in libgcc/config.host is also disabled for now due to lack of sys/ucontext.h. Change-Id: Idad7c75a9eaf27e6737fe3a217ff2791b4bf8358
* Initial checkin of GCC 4.9.0 from trunk (r208799).Ben Cheng2014-03-261292-0/+399107
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba