505e4ec646d965e6ee730c5e4826a4dabe095ccb |
|
14-Dec-2015 |
Elliott Hughes <enh@google.com> |
Be smarter about stack-protector on the host. Some projects are still built with our host GCC 4.8, which doesn't support -fstack-protector-strong. The combo .mk files are used by GCC and clang, so it's not safe to turn on -fstack-protector-strong there. Instead, do it in the clang-specific .mk for now. We can clean this up when elfutils (the last code built for the host with GCC that I'm aware of) is built by clang. We'll be able to remove the host GCC prebuilts too! Change-Id: I314b9eab071c132a8e2cb8cc779a75ae8abb12e2
|
ae316d2d59203be682c959009877dfb51204a5aa |
|
14-Dec-2015 |
Elliott Hughes <enh@google.com> |
Enable -fstack-protector-strong for the host. This results in nearly all functions with the possibility of stack corruption getting stack canaries, because it applies to any function taking a reference to the frame or with a local array rather than just the functions with arrays larger than 8 bytes. It was developed for use in Chrome (and Chrome OS) and has also been adopted by various other distributions (Arch, Fedora, Ubuntu, etc). The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to ~0.7% with the more conservative switch. The increase in the performance loss is usually minimal. The overall size increase once everything other than C and C++ code is taken into account is minimal, and it greatly improves the mitigation of stack buffer overflow vulnerabilities. https://lwn.net/Articles/584225/ Change-Id: I97a2187cebac64e3b9f22b691d4676b6da083ebd
|
da9c00da5f7b2c6985f99bf922e4b3148d2f8f37 |
|
03-Dec-2015 |
Dan Willemsen <dwillemsen@google.com> |
Enforce linker version-scripts are valid Currently, if a version script is passed to the linker (using -Wl,--version-script,...), it is used to limit symbol visibility and assign symbol versions. But if a symbol is listed in the version script but is not present in the binary, no error or warning is given. Pass -Wl,--no-undefined-version to the linker so that it verifies all (non-wildcard, C) entries in the version script match symbols in the binary. Change-Id: I65878931ab61124ae75e2c738cc733adfb107afc
|
0e7587a9ea58b69c9daa43cd682a4657d23b9b23 |
|
09-Oct-2015 |
Shinichiro Hamaji <hamaji@google.com> |
Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries When a shared object is rebuilt, all dependent libraries and executables are rebuilt. Such rebuild is unnecessary when there is no interface change. With this patch, .toc files will be generated for all .so files. The rule which generates .toc files has ninja's restat=1 and .toc files are not changed ninja won't rebuild dependent targets. Performance: $ m && touch bionic/libc/stdio/stdio.c && time m Before: 1m03s (2563 targets) After: 21s (90 targets) Bug: 24597504 Change-Id: Ia5dd950273d143f4e99eee8bef7478f1a94cd138
|
c33939858114704be401e7257c65fc65717f77f1 |
|
23-Sep-2015 |
Dan Willemsen <dwillemsen@google.com> |
Remove trailing / for HOST_TOOLCHAIN_FOR_CLANG The darwin version doesn't have a trailing slash. The common case is to append a path to it: $(HOST_TOOLCHAIN_FOR_CLANG)/lib/... Which means we end up with two slashes. Change-Id: I74e88924ecfd092c5f7871e188ede0aab29cf65b
|
ac9eea9463c25d020751c6e53bf08f9a6987a4de |
|
21-Aug-2015 |
Elliott Hughes <enh@google.com> |
Fix Linux host checkbuilds. Turns out that thanks to 9d59f417767991246848c3e101cb27d2dfea5988 we actually build *all* the host libraries both 32- and 64-bit. Rather than fix the libraries (or fixing things so we don't build stuff we don't need) right now, let's just put _FILE_OFFSET_BITS and _LARGEFILE_SOURCE back. Change-Id: I6c2d6a6919d1518f775e0d6c050e2c774994c5bd
|
e31dfe965f4b7f601beb009bd713fa4d9297db37 |
|
20-Aug-2015 |
Elliott Hughes <enh@google.com> |
Kill host Linux AndroidConfig.h. We only build 64-bit now anyway. Change-Id: I4bc9487522d215234509510bee66e4f210d86765
|
7dd8ec1761ade0c2d114ee93700ce0d654f4e069 |
|
13-May-2015 |
Elliott Hughes <enh@google.com> |
Revert "Revert "Turn on _FORTIFY_SOURCE=2 for the host."" This reverts commit e27b214fc248d8927c42c5529d5c9fe75e2591aa. Change-Id: I3d739c0594dbe4ecd62c5b07064ada7de6cdaadb
|
e27b214fc248d8927c42c5529d5c9fe75e2591aa |
|
13-May-2015 |
Elliott Hughes <enh@google.com> |
Revert "Turn on _FORTIFY_SOURCE=2 for the host." This reverts commit 224806d00ea1fbafde1adfd6fdf26693170f2648. Change-Id: I654157ec4be7ff95356ab4a25b27c44762793e74
|
224806d00ea1fbafde1adfd6fdf26693170f2648 |
|
13-May-2015 |
Elliott Hughes <enh@google.com> |
Turn on _FORTIFY_SOURCE=2 for the host. Bug: http://b/20558757 Change-Id: Ic0c173d25dc6b2fa9c3122a523af5f37bc1b8c55
|
100acd1001ecebf11a28246bb759af015fdfebd6 |
|
25-Apr-2015 |
Nick Kralevich <nnk@google.com> |
host compiler: enable compiler hardening flags Enable the following compiler hardening flags: * -Wl,-z,relro * -Wl,-z,now * -fstack-protector relro / bind_now make the relro region read-only after linking, preventing certain attacks against ELF data structures. stack-protector adds stack canaries, which can detect exploits which overwrite parts of the stack. Explicitly not added in this change is FORTIFY_SOURCE=2. Adding that option turns on glibc's warn_unused_result attributes. This generates a huge number of new compile time warnings, and for the multiple makefiles which have -Werror in them, turns those warnings into errors. I'm not able to fix all the errors right away. Bug: 20558757 Change-Id: I86791177c6695f5325233d9dd9a5dd3ccc2b1a2f
|
343ed674e35ae0911542abe67dca3fb3a1cccf95 |
|
26-Jan-2015 |
Dan Albert <danalbert@google.com> |
Use prebuilt libclang_rt.profile. Bug: 17574078 Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
|
3be11c6e613fce675a12bd1094ba7b67bdf3bdbc |
|
05-Nov-2014 |
Chih-Hung Hsieh <chh@google.com> |
Upgrade host tool to x86_64-linux-glibc2.15-4.8 BUG: 17915392 Change-Id: I301b8ae70fabedfafea5ae0094bbd46c208f4622
|
ae2d47a47f764b51c933a48774f94fda2ed80153 |
|
16-Sep-2014 |
Alexander Ivchenko <alexander.ivchenko@intel.com> |
Remove "-mstackrealign" option from all x86 builds. For ndk docs change, please refer to: https://android-review.googlesource.com/#/c/110100/ Change-Id: I8428e7a979eb02441066aeeee43ce693d4d0dc8d Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
|
44ee3419e708fcd6d204c85b4510a0d2a54d8bce |
|
28-May-2014 |
David 'Digit' Turner <digit@google.com> |
Update host linux toolchain to gcc 4.8 This patch ensures the build system uses the prebuilt gcc-4.8 toolchain when building host Linux binaries, instead of the gcc-4.6 one. Change-Id: I7b449650714ba4314a780827e0243f2af40ec82c
|
5e2ebcbe266669397d03ccbcc2e69fb845da5d5b |
|
29-Jul-2014 |
Ying Wang <wangying@google.com> |
Use hermetic host toolchains. Change-Id: I6bb72b5728d1075be9645f8473dcf3db759fa66a
|
76bd60b7dadda4f0f1f1e88afbe2e9dd551a6ef7 |
|
19-Jul-2014 |
Stephen Hines <srhines@google.com> |
Default to "prescott" as our baseline i686 host build architecture. Bug: 16408818 Change-Id: I41760605bf9f4589859afd20cc96ccbedb6fe82c
|
1b50a12a81906f27ae8ea6e7cd81dd4bf3a365f8 |
|
19-Jul-2014 |
Stephen Hines <srhines@google.com> |
Default to "prescott" as our baseline i686 host build architecture. Bug: 16408818 Change-Id: I41760605bf9f4589859afd20cc96ccbedb6fe82c
|
6feb6d5607ce86a446645564212043964628f540 |
|
17-Apr-2014 |
Ying Wang <wangying@google.com> |
Support host multilib build This change basically ported our target multilib to the host side. It supports 2 host build modes: x86 and x86_64 multilib build. For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64 multilib build. Later we'll default to x86_64 build and have a flag to force 32-bit only build, which may be needed by SDK build. In host module definition, like in target ones, you can use the following LOCAL variables to set up multilib configuration: LOCAL_MULTILIB: can be "both", "first", "32" or "64". It also supports the same set of arch or 32-vs-64 specific LOCAL variables. By default, it builds only for the first arch. To keep path compatibility, in x86_64 build files are still output to out/host/linux-x86; Both 32-bit and 64-bit executables are in out/host/linux-86/bin; In x86_64 build 32-bit shared libraries are installed to out/host/linux-x86/lib32 and 64-bit shared libraries are installed to out/host/linux-x86/lib; 32-bit object files are output to out/host/linux-x86/obj32 and 64-bit object files are output to out/host/linux-x86/obj. Bug: 13751317 Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
|
48f239c94faca140427afc9aa06cf356b1b6b0de |
|
09-May-2014 |
Andrew Hsieh <andrewhsieh@google.com> |
Disable canonical prefixes of system headers GCC know a few pre-defined paths (relative to its location) to search for headers, libraries, program, etc. By default GCC prefixes its own path(argv[0]) and calls realpath() which result in absolute path with all symlink, . and .. removed. It's usually good to have canonicalised paths, but absolute paths in *.d file can cause unnecessary relinking when stale entries in ccache cache hit Add -no-canonical-prefixes (gcc>=4.6) and -fno-canonical-system-headers (gcc>4.6) to disable realpath() on prefixed paths Change-Id: I58d739e61fb013015fb05a9c98b2132b307f915a
|
dfde360b2cd2b409ffd9f077f2756ce070972116 |
|
21-Mar-2014 |
Andrew Hsieh <andrewhsieh@google.com> |
Switch to new host prebuilt x86_64-linux-glibc2.11-4.6 Change-Id: I763398d523bf4851a13722f72b12ec69d7a4bb4f
|
02cefc93a8b7555dd5e45f39348ab1473192983b |
|
20-Mar-2014 |
Tim Murray <timmurray@google.com> |
Make Clang host builds hermetic on Linux. This lays the groundwork for making builds hermetic on Darwin as well. That will be fixed in a future patch. bug 13435344 Change-Id: Iae82d0b9efad0598d682ff5fd4daa737aa607866
|
cbe162e914dfc494e2670e05341e5966477729b3 |
|
12-Mar-2014 |
Andrew Hsieh <andrewhsieh@google.com> |
Fix HOST_TOOLCHAIN_PREFIX Previously HOST_TOOLCHAIN_PREFIX can't accept toolchain in arch-os-*-gcc format. Fix it so we can try out new host toolchain, eg. HOST_TOOLCHAIN_PREFIX=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/x86_64-linux- make Change-Id: Ic1092593036c41d5471e788654fb4e0991dd7e40
|
aa54033b469739b31e8c48eaa26f0dc7ef531738 |
|
11-Mar-2014 |
Ian Rogers <irogers@google.com> |
Define __STDC_CONSTANT_MACROS globally to work around host build differences. Change-Id: I945128b3087b28f62467c7123b759e3514027574
|
c61a9425cd6503783030a20214d92abf7804a613 |
|
11-Mar-2014 |
Ian Rogers <irogers@google.com> |
Revert "Define __STDC_LIMIT_MACROS globally to work around host build differences." This reverts commit 668427c941bd88cacdf24d0562e6b68eb93038a1. Change-Id: I3694aad84e7499e4c6839db0bd06acf5166e4802
|
668427c941bd88cacdf24d0562e6b68eb93038a1 |
|
10-Mar-2014 |
Ian Rogers <irogers@google.com> |
Define __STDC_LIMIT_MACROS globally to work around host build differences. Change-Id: I571fc5a4b35c830ca8de4dc3117aef258dffa1bd
|
61e5059ef768388db01232c61879d2ba3e0c1d47 |
|
29-Jan-2014 |
Ian Rogers <irogers@google.com> |
Fix the host inttypes.h problem globally. Bug: 12708004 Change-Id: I2c75647bac304b82e150c540b9e6c5568997596d
|
afb45637b2581be3501e520477b6b264fb2fed9e |
|
12-Dec-2013 |
Joshua J. Drake <android-open-source@qoop.org> |
Enable NX protections Add -Wa,--noexecstack and -Wl,-z,noexecstack as default flags when compiling host-side applications. This enables NX protections, which prevent code from executing on the stack or heap. NX protections make exploiting memory corruption issues more challenging and is an important security feature. Change-Id: Iae580abe887e01f9029ec2a4e0fc0aae496724a4
|
35a6b4fb65b17fbc698fbd0796eee89b7a06c5e9 |
|
27-Feb-2013 |
Ian Rogers <irogers@google.com> |
Specify -msse3 on host as on target. Make the host and the target x86 build more uniform by using the same machine flags. Its unlikely Android has ever been built on a machine without SSE3 support. Bug: 8068608 Change-Id: I19635528b61bf2c6faf02c2e575b1d9bf8025d3a
|
79e3f7799648f6de27087f17b2b50cc79870805e |
|
12-Feb-2013 |
Ying Wang <wangying@google.com> |
Allow user to override the linux host toolchain. Bug: 8181840 Change-Id: Ib2a90d33414758e95b1a3c60db62c4188944dfdd
|
85e8cda3405be4acc0da0a094209dd0e8f11cd55 |
|
12-Nov-2012 |
Ying Wang <wangying@google.com> |
Remove the obsolete comments and change the misleading var name. Change-Id: Ib19099cbce0133f5c7df44fa0fd80215809a1ad8
|
5bdf305bbe529a85735200353478057b65bb462e |
|
20-Sep-2012 |
Ying Wang <wangying@google.com> |
Move AndroidConfig.h from system/core to the build project. So unbundled branches don't need to include the system/core project. Change-Id: Ic4ef62ee6df069b9b2dd123aed95a3e7fcdfc146
|
31ef1037bf7b66e949ecf52a1a29672d43ebfef8 |
|
21-Aug-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Added BUILD_HOST_static to build statically linked executable/shared-lib Statically linked executable/shared-lib (eg. SDK tools) are useful in sandboxed environment. In BUILD_HOST_static zipalign needs -lpthread indirectly: zipalign->libutils.a->liblog.a->logd_write.c->pthread Change-Id: I615f574e918c83ed1ab82db2453b69d0420cb59c
|
da4bf4251451d2da8883d636849b65fcc368a575 |
|
17-Aug-2012 |
Ying Wang <wangying@google.com> |
Don't include system/core/include/arch/<arch>/Android.mk for apps-only build. Bug: 6994483 Change-Id: I76c4d96264cf94a79d59fdeb52bb37c07a9458dd
|
f9613a4f730b8a385971f95150582b9a543302ae |
|
27-Apr-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Added BUILD_HOST_static to build statically linked executable/shared-lib Statically linked executable/shared-lib (eg. SDK tools) are useful in sandboxed environment. In BUILD_HOST_static zipalign needs -lpthread indirectly: zipalign->libutils.a->liblog.a->logd_write.c->pthread Change-Id: I8fa91a937b728ccdf942c4ba199efb1e2e49da3d
|
4e82d1fa7f3fb1ecfa6cbd8b8ddcb6c0c0e17d1d |
|
21-Apr-2012 |
Jean-Baptiste Queru <jbq@google.com> |
On linux, always use the prebuilt host toolchain Change-Id: I8077c4780e1e3540e5e2133cf0ffa61d474d3acc
|
2245d17dc847ecb5371807466788552ca0198152 |
|
13-Mar-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Point to new linux prebuilt toolchain for SDK build Change-Id: I21849119b0f3f45f950e9e6d1da0833aff381fb7
|
0e63fd37ddc539912a1b89875a925c75e4a281b2 |
|
13-Mar-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Point to new linux prebuilt toolchain for SDK build Change-Id: I21849119b0f3f45f950e9e6d1da0833aff381fb7
|
ed6b8155056c52ac6d6a38151a97fc948b4614c3 |
|
28-Feb-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
BUILD_HOST_64bit=1 to build host tools in 64-bit By default we build tool in 32-bit. This flag allow individual tool and its dependencies to be built in 64-bit (eg. Emulator). Fixes to resolve 64-bit porting issues (in other git) will be submitted seperately. Change-Id: I486cf7ddac727d3c374ed890857d497c3a69e598
|
d75dbec617307ecb7c728201a4da82f1177ff742 |
|
11-Jan-2012 |
Jean-Baptiste Queru <jbq@google.com> |
Revert "Reference new location of SDK toolchain" This reverts commit 1b834c6660c80d376151e977466e1622b67a2af0.
|
1b834c6660c80d376151e977466e1622b67a2af0 |
|
10-Jan-2012 |
Jean-Baptiste Queru <jbq@google.com> |
Reference new location of SDK toolchain Change-Id: If470d742a92061006d94b72f21df5c642348e179
|
cb48497ff2f84e8f7def981246ddc028ea126879 |
|
06-Sep-2011 |
Jim Huang <jserv@0xlab.org> |
HOST_linux-x86: Avoid doubly define macro _FORTIFY_SOURCE While building Android with latest host gcc, it causes the following build error: Install: out/host/linux-x86/bin/mkbootimg host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] <built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors In order to make build system happy, this patch does unset macro _FORTIFY_SOURCE and then define it in host cflags. Change-Id: Ic37a90f05081a2c3650b3335bc87e9e895900fb2
|
fddf23f19e7604e6c5b3c5377e7ff6293539a1da |
|
06-Sep-2011 |
Jim Huang <jserv@0xlab.org> |
HOST_linux-x86: Avoid doubly define macro _FORTIFY_SOURCE While building Android with latest host gcc, it causes the following build error: Install: out/host/linux-x86/bin/mkbootimg host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] <built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors In order to make build system happy, this patch does unset macro _FORTIFY_SOURCE and then define it in host cflags. Change-Id: Ic37a90f05081a2c3650b3335bc87e9e895900fb2
|
59d296623b0820fa0689b70c20af1db6b4435ab2 |
|
06-Sep-2011 |
Jim Huang <jserv@0xlab.org> |
HOST_linux-x86: Avoid doubly define macro _FORTIFY_SOURCE While building Android with latest host gcc, it causes the following build error: Install: out/host/linux-x86/bin/mkbootimg host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] <built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors In order to make build system happy, this patch does unset macro _FORTIFY_SOURCE and then define it in host cflags. Change-Id: Ic37a90f05081a2c3650b3335bc87e9e895900fb2
|
e33ba4c49ed461d608c65eb4e09d31ca81d167ff |
|
12-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Remove the simulator target from all makefiles. Bug: 5010576 Change-Id: Ie814f4c8d3aa1e7cc7f5735822ab25542f36cf62
|
60a1e8805290267d6c8f32051f25e6f21fae909a |
|
12-Jan-2011 |
David 'Digit' Turner <digit@android.com> |
Add support for custom Linux host toolchains when building the SDK. This is needed in order to build Linux SDK binaries that can run properly on Ubuntu 8.04 (Hardy). By default, the host toolchain on 10.04 (Lucid) generates machine code that won't run on Hardy due to GLibc ABI mistmatches. Note that nothing happens if the new toolchain is not in the prebuilt tree. Change-Id: I914f5a303f16b6871759ce5a7178585ed3060870
|
0960ca748804b772453ebe50d212a691c1a6c066 |
|
10-Dec-2010 |
David 'Digit' Turner <digit@google.com> |
Add support for custom Linux host toolchains when building the SDK. This is needed in order to build Linux SDK binaries that can run properly on Ubuntu 8.04 (Hardy). By default, the host toolchain on 10.04 (Lucid) generates machine code that won't run on Hardy due to GLibc ABI mistmatches. Note that nothing happens if the new toolchain is not in the prebuilt tree. Change-Id: I45c1f68e37e15a0032f885df1c5c0f297b3d8642
|
163fa35fe3d49f0178b0173d662cf899989b7bcb |
|
02-Sep-2010 |
Ying Wang <wangying@android.com> |
Disable new longjmp in glibc 2.11 and later. Bug: 2967937 Change-Id: I7a5ef082502192f41c26a48632edfe775dea7648
|
fb644881b6083aa0d9d15e7aad8bfa5a429b1c37 |
|
02-Sep-2010 |
Ying Wang <wangying@google.com> |
Disable new longjmp in glibc 2.11 and later. Bug: 2967937 Change-Id: I4e2a5f806ad45a01ca7f8c4d032cd29fce1d794d
|
16e95bb99df4515ad37d73562bffb1a9fd21c162 |
|
24-Feb-2010 |
Andy McFadden <fadden@android.com> |
Build the target side of the simulator as 32-bit. This detail got lost in my previous cleanup change 9b4a812. Also add a comment explaining why the host side of the simulator needs to be built in 64-bit (wxWidgets). Change-Id: I2a867f7f80b43d53e73348b19f6ae834600295f9
|
9b4a81237be29b0aae50d1e370b63a07ea2b88b9 |
|
23-Feb-2010 |
Jean-Baptiste Queru <jbq@google.com> |
Get rid of $(combo_target) The only OS-ARCH combo that would have benefited from it is linux-x86, but it explicitly used separate configurations for the HOST_ and TARGET_ side of things. This makes is clear which files are related to the HOST_ configuration and which ones are related to the TARGET_ configuration, and expands $(combo_target) to the only possible/reasonable value that it could have had in every file. This also cleans up the simulator, by moving it in a single place in TARGET_linux_x86 (since the only part that's special is to use HOST_ settings even when building TARGET_ modules). Change-Id: I2420eeb8cfe539f5807ec99cb3177ffb9f2476d5
|