aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-12Remove support for 32-bit Windows.HEADndk-r23-beta6ndk-r23-beta5ndk-r23-beta4ndk-r23-beta3ndk-r23-beta2ndk-r23-beta1ndk-r22-beta1ndk-r22ndk-r21endk-r21dndk-r21cndk-r21bndk-r21-rc1ndk-r21-beta2ndk-r21-beta1ndk-r21ndk-release-r23ndk-release-r22ndk-release-r21mastermainbusytown-mac1010-releasebusytown-mac1008-releaseDan Albert
Test: ./build.py --host windows64 --toolchain aarch64-linux-android Bug: None Exempt-From-Owner-Approval: janitorial Change-Id: Ifdb9e073d4f86612d32d96c47df566c1b7228501
2019-03-22Adapt to ndk.hosts changes.Dan Albert
Test: ./build.py --toolchain aarch64-linux-android Test: ./build.py --toolchain aarch64-linux-android --host windows Test: ./build.py --toolchain aarch64-linux-android --host windows64 Bug: None Exempt-From-Owner-Approval: trivial janitorial changes Change-Id: I925c1f2ae303089fb2469ccfe3f09893548fce00
2018-11-14Bootstrap build with Python 3.ndk-r20bndk-r20-beta3ndk-r20-beta2ndk-r20-beta1ndk-r20ndk-release-r20Dan Albert
Test: ./build.py --toolchain aarch64-linux-android Bug: None Change-Id: I11ae974ca43590b4801d67077cf2d4f8838dbe30
2018-08-31Build libgcc_s DLLs with additional linker flagsndk-r19cndk-r19bndk-r19-beta2ndk-r19-beta1ndk-r19ndk-release-r19Pirama Arumuga Nainar
Bug: http://b/113171785 This hacked up change passes security-related linker flags for libgcc_s DLLs. It should affect only Windows targets in gcc-4.8.3. There doesn't seem a way to pass separate LDFLAGS for 32- and 64-bit when running 'configure', so we'd end up without --high-entropy-va for the 64-bit DLL. Instead, this hacky change gets the behavior we want and is unlikely to regress. To be safe https://android-review.googlesource.com/c/toolchain/mingw/+/743702 also verifies that all DLLs built have the correct flags. Test: toolchain/mingw/build.sh Change-Id: I9d52e7b8cb449fcaf11c7f771761f11c7d35f99b
2018-07-11Merge "Add __emutls_unregister_key function"Treehugger Robot
2018-06-28libgcc: work around old Bionic loader bugRyan Prichard
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
2018-06-05Add __emutls_unregister_key functionRyan Prichard
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
2018-05-21Delay emutls deallocation for one roundndk-r18bndk-r18-beta2ndk-r18-beta1ndk-release-r18Ryan Prichard
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
2018-04-26Merge "gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics."android-build-prod (mdb)
2018-04-24gcc: backport patch to support vrnd<*>_f64 aarch64 intrinsics.Yunlian Jiang
This backports upstream patch to add support of vrdn<*>_f64 intrinisics for aarch64. This is needed because glibc 2.27 uses some of them. Author: mshawcroft <mshawcroft@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Apr 22 08:39:48 2014 +0000 [AArch64] vrnd<*>_f64 patch This patch adds vrnd<*>_f64 aarch64 intrinsics. A testcase for those intrinsics is added. Run a complete LE and BE regression run with no regressions. BUG=chromium:834385 TEST=./setup_board --board kevin --nousepkg cross-aarch64-cros-linux-gnu-glibc builds for glibc 2.27 Change-Id: Iaf9508a433e35d3304e44ac4b6c93071ff6c5ec0
2018-04-24gcc: backport an upstream patch to make it work with newer glibc.Yunlian Jiang
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
2018-02-26Fix gcc 4.8.3 makeinfo build failureRyan Prichard
/usr/local/google/home/rprichard/android/mingw/toolchain/gcc/gcc-4.8.3/gcc/doc/gcc.texi:88: warning: @tex should only appear at the beginning of a line /usr/local/google/home/rprichard/android/mingw/toolchain/gcc/gcc-4.8.3/gcc/doc/gcc.texi:208: no matching `@end tex' /usr/local/google/home/rprichard/android/mingw/toolchain/gcc/gcc-4.8.3/gcc/doc/gcc.texi:208: no matching `@end multitable' /usr/local/google/home/rprichard/android/mingw/toolchain/gcc/gcc-4.8.3/gcc/doc/gcc.texi:208: no matching `@end titlepage' Makefile:4353: recipe for target 'doc/gcc.info' failed Even though it says "warning", the command exits unsuccessfully and fails the build. Adopt part of a patch from: https://gcc.gnu.org/ml/gcc-patches/2013-09/msg02100.html This change is already in our gcc-4.9 directory. For reference, here's the makeinfo version on my machine: $ makeinfo --version texi2any (GNU texinfo) 6.4.90 Test: ./toolchain/mingw/build.sh (in AOSP mingw branch) Change-Id: Ib740c39d127ac8a127c929465fdf89477698a5e4
2018-02-05[GCC] Fix #endif problem in libgcc/emutls.cCaroline Tice
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
2018-01-29[GCC] Update with latest retpoline fixes from Intel.Caroline Tice
Intel has updated their retpoline patches since we created our original patch. This CL updates our retpoline changes to match the latest from Intel. Bug: None Test: Tested extensively in ChromeOS. Built x86 platform & kernel images in Android. Change-Id: Id1a18cb1f1f4461832a017cb5c5d59e5400d9d08
2018-01-19Merge "[libgcc] Fix emutls.c to not leak pthread keys."ndk-r17bndk-r17-beta2ndk-r17-beta1ndk-r17ndk-release-r17Caroline Tice
2018-01-19[libgcc] Fix emutls.c to not leak pthread keys.Caroline Tice
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
2018-01-08[GCC] Commit retpoline patch code, for fixing security issues.Caroline Tice
This applies the Intel GCC code patches, to allow compiling with appropriate flags for mitigating the indirect branch variant of the speculative execution security flaw. Bug: None Test: This is already in place in ChromeOS and has been tested on the ChromeOS kernels. Change-Id: Ideffb433b697f1fe7e4ca2c1eaa968160abfcc8b
2017-09-18update-prebuilts: use fetch_artifact for downloading prebuilts.Rahul Chaudhry
The old method of constructing a URL and downloading using sso_client has stopped working since the URLs have changed. Using fetch_artifact makes this step more robust against future changes in URL schemes. Bug: 37683243 Test: './update-prebuilts.py 4342532' works. Change-Id: I14053709bb9839990e8cf59418010862daf09236
2017-09-18update-prebuilts: do not update mips prebuilts.Rahul Chaudhry
The aosp-gcc builder has stopped building the toolchain for mips. Bug: None Test: None Change-Id: Ia3bf3a41b2d0e098efd6e8c526b81f6ef2b1beb0
2017-09-14Merge "Remove -Bsymbolic from the Android link spec."Treehugger Robot
2017-07-13Disable linker PIE support with copy reloc.ndk-r16-beta2ndk-r16-beta1ndk-r16ndk-release-r16ndk-r16-releaseRahul Chaudhry
This feature gets enabled with binutils 2.27 upgrade, but breaks unittests in chromium os: - https://bugs.chromium.org/p/chromium/issues/detail?id=738188 This is because of the upstream gcc bug for which the patches were not backported to 4.9.x branches: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 BUG: None TEST: Chromium OS unittests pass again. Change-Id: I9827cbe56378727f979991993d06de0b4c6b5478
2017-07-10Add an OWNERS file for GCC.Caroline Tice
Bug: None Test: None Change-Id: I5c573476a7c4e341b6eafa6d1050334f63526585
2017-01-29Fix GCC bug PR 46639, for kernel securityndk-r15-beta2ndk-r15-beta1ndk-r15-releaseCaroline Tice
The kernel security team asked us to fix this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 This CL does that. Note: This CL depends on https://android-review.googlesource.com/329799 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46639 Test: Ran build.py for all toolchain versions; used resulting compilers to build bullhead, angler and fugu plaform images. Ran checkbuild.py. Change-Id: I1e1abf594cff56c6ed6dc228a1d084da18c11420
2017-01-24[GCC] Add '--disable-multilib' to gcc configuration.Caroline Tice
Disabling multilibs fixes the GCC builds for both MIPS and x86_64. Without this, the GCC compiler fails to build for those architectures. Bug: None Test: Ran build.py without '--toolchain' flag; it successfully built all of the compilers. Change-Id: I018825177e77812a705db54cdad468239e48a87f
2016-10-06fix errors in gcc compiler wrapper.ndk-r14-beta2ndk-r14-beta1ndk-r14ndk-r14-releaseYunlian Jiang
BUG=none Test: it runs without error. Change-Id: I5067e352facb416a04f0064ae68fd61ba29b1011
2016-10-04Merge "[GCC 4.9] Fix posix_memalign declaration."Caroline Tice
2016-10-04Merge "gcc: add a python wrapper for gcc."Yunlian Jiang
2016-10-04[GCC 4.9] Fix posix_memalign declaration.Caroline Tice
Remove the 'throw()' from posix_memalign declaration if __GLIBC__ is not defined, so that it matches declaration in bionic's stdlib.h (avoid conflicting decl error). Can't remove 'throw ()' altogether, because it IS in glibc's stdlib.h, which this has to match in ChromeOS. BUG=b:31366027 TEST=successfully built ChromeOS for x86, x86_64, arm, arm64 and ran HWTests on all; successfully built chromiumos-sdk. Built Android platform & kernel. Successfully ran NDK checkbuild.py script. Change-Id: I0a8b4daf5d10f56f7a318738a0946e4ad5b7dd90
2016-10-03gcc: add a python wrapper for gcc.Yunlian Jiang
This add a python wrapper for gcc to make goma do not need to hand gcc and clang separately. BUG 31444867 TEST= build new gcc. Call arm-linux-androideabi-c++ -v and arm-linux-androideabi-g++ -v in/out the directory of the gcc binary, it works. Change-Id: Ib02cff8f33306b089e13ade51033a3b0927b4308
2016-09-29Add -androidkernel-readelf symlink.Alex Deymo
Bug: 31636643 Change-Id: Ibff564a9ee068c8c8749461b610c1b0f4cc592a5
2016-07-01[GCC] Add README.version file (owners info).ndk-r13-beta2ndk-r13-beta1ndk-r13ndk-r13-releaseCaroline Tice
This adds a new README.version file, containing owner information for GCC. TEST=None BUG=None Change-Id: Idb8bf9b47c38aa944b67b059c995c8755b0902df
2016-05-12Fix gthreads for ChromeOS, too (recent change broke ChromeOS).Caroline Tice
Change-Id: Ic7f1a0cd3375b6e247f1ca972922ecf5452a33ac
2016-04-25Attempt to fix missing gthreads in libstdc++.ndk-r12bndk-r12-beta2ndk-r12-releaseCaroline Tice
The if-else clauses of an if-statement were reversed, causing libstdc++ to not find/define the gthreads. This CL should fix that. Bug: http://b/27433401 Change-Id: Ic8a0afbd4cfdff48cfa4edf931cda2f1409dae34
2016-04-01Empty commit to kick buildbot.ndk-r12-beta1Than McIntosh
Change-Id: I8e73e255f5dea2c64d486389ebf2749f21fe69b4
2016-04-01Merge "[ndk gcc] Finish fixing the libatomic IFUNC problem."Caroline Tice
2016-04-01Include -kernel link for 'strip'.Than McIntosh
When creating the symlinks for the kernel variant of the toolchains, include a link for 'strip' (needed for brillo kernel build). Bug: 27959161 Change-Id: Id83e3e03f17b3de6178853d20684b474178d7928
2016-03-31[ndk gcc] Finish fixing the libatomic IFUNC problem.Caroline Tice
The previous CL, with --enable-libatomic-ifuncs, was missing an important piece. This fixes that problem. (See https://buganizer.corp.google.com/issues/22699878) Change-Id: I42f9529f5e40187843a9a55ae80874eb8fae2a22
2016-03-29Merge "Add top-level flag, --enable-libatomic-ifuncs=[yes/no]"Caroline Tice
2016-03-25Add top-level flag, --enable-libatomic-ifuncs=[yes/no]Caroline Tice
This CL adds a top-level configure flag, --enable-libatomic-ifuncs. IF this is set to 'no', then libatomic will not be configured/built to use IFUNC. This is to fix https://buganizer.corp.google.com/issues/22699878 Change-Id: I76741fe854fc9c32a230b67c72920adfb00473ee
2016-03-25Fix issue of generating symlinks for libgnustl_shared.soCaroline Tice
With the changes that unified the Android & ChromeOS GCC compiler, some of the conditional changes introduced with the enable-bionic-libs flags were causing libgnustl_shared.so to be generated with symbol versions and symbolic links, which broke certain things. This CL fixes that issue (https://buganizer.corp.google.com/issues/27832514) Change-Id: Ib7fe825f2be353e0ff7beba008a71793b1ad2244
2016-03-16GCC unification, part 2. Fix various errors from previous unificaiton.Caroline Tice
The previous version of the unified GCC compiler (Android & ChromeOS) caused some ChromeOS tests to fail. It also caused an Android NDK test case to fail. This CL fixes those problems. In particular it does the following: - Fix some file formatting errors from previous unification patch. - Update ChangeLog files to reflect Android backport patches. - Find and incorporate a few missing pieces from the following backports backports from trunk r221007, r221675, r222011, r212011, r214942, r214957, r215012, r215016, r218115, r218733, r218746, r220491. This involved small changes in the following files: gcc/cfghoks.c gcc/cfgloop.c gcc/cfgloop.h gcc/except.c gcc/loop-init.c gcc/omp-low.c - Fix minor Android test case regression introduced in the previous unification patch. Change-Id: I482e3a34e3ed97c7ba609fe2954b4781f02ec617
2016-02-29Merge "Unify ChromeOS and Android versions of GCC."Caroline Tice
2016-02-26Unify ChromeOS and Android versions of GCC.Caroline Tice
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
2016-02-24Update 4.8.1 to 4.8.3.Dan Albert
My previous drop was the wrong version. The platform mingw is currently using 4.8.3, not 4.8.1 (not sure how I got that wrong). From ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2. Bug: http://b/26523949 Change-Id: Id85f1bdcbbaf78c7d0b5a69e74c798a08f341c35
2016-02-18Include 'nm' and 'size' in androidkernel list.Than McIntosh
Bug: http://b/25371547 Change-Id: I2baa3c7bb74e39c95f32ebd98fd2bb091dbf0cd8
2016-02-16Extend the lib copying workaround for lib64.Dan Albert
The Windows (and probably Darwin) builds were missing the lib64 variants of libgomp.a and friends. This will still miss the libx32 libs, but we don't support that anyway. Bug: http://b/27208805 Change-Id: I19a8eb10cbedf03cba27ab5f8dc38c13c8538f25
2016-02-04Merge "Check in a pristine copy of GCC 4.8.1."Dan Albert
2016-01-28Add --cachedir option to update-prebuilts.py.Than McIntosh
Tells the script to draw prebuilt tar files from an existing dir (if present) instead of downloading. Useful for doing hand testing of toolchain changes. Change-Id: I166e1a7f0e7947e50b36c9e9b868f17ee8507503
2016-01-22Check in a pristine copy of GCC 4.8.1.Dan Albert
The copy of GCC that we use for Android is still not working for mingw. Rather than finding all the differences that have crept into our GCC, just check in a copy from ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.8.1.tar.bz2. GCC 4.8.1 was chosen because it is what we have been using for mingw thus far, and the emulator doesn't yet work when upgrading to 4.9. Bug: http://b/26523949 Change-Id: Iedc0f05243d4332cc27ccd46b8a4b203c88dcaa3
2016-01-15Revert "Fix toolchain/gcc build for mingw."Than McIntosh
This reverts commit f1c3ad6cac0465017759cce0cb381ce66760d907. [Change no longer needed since we're switching to a different gcc for the mingw build.] Change-Id: I03a57335e9ca94c6848cb71bbc1a451f0c0ef18f