Commit graph

949 commits

Author SHA1 Message Date
Elliott Hughes
e27b214fc2 Revert "Turn on _FORTIFY_SOURCE=2 for the host."
This reverts commit 224806d00e.

Change-Id: I654157ec4be7ff95356ab4a25b27c44762793e74
2015-05-13 19:32:59 +00:00
Elliott Hughes
224806d00e Turn on _FORTIFY_SOURCE=2 for the host.
Bug: http://b/20558757
Change-Id: Ic0c173d25dc6b2fa9c3122a523af5f37bc1b8c55
2015-05-12 21:41:52 -07:00
Dmitriy Ivanov
392569c12c Fix mips build
Change-Id: Ifbb2df36c173511c118f34cfa39bb01ca7f7d380
2015-05-04 18:10:47 -07:00
Chih-Hung Hsieh
f274888870 Merge "Upgrade x86 gcc to 4.9 and disable devirtualization." 2015-05-04 23:36:51 +00:00
Dan Albert
216ecac61e Fix prebuilts for target builds with USE_MINGW=1.
USE_MINGW=1 mm didn't work in directories that contained target modules
because the build system would use the Windows locations and extensions
when trying to find the host GCC prebuilts. Windows is the target OS,
not the OS we're building from.

Change-Id: Ic994fed15388d0c7d393f71ba28fe7afdc659f5c
2015-05-04 22:44:39 +00:00
Chih-Hung Hsieh
90036610dd Upgrade x86 gcc to 4.9 and disable devirtualization.
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.

BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
2015-05-04 14:04:58 -07:00
Dmitriy Ivanov
8387d99ec3 Revert "Revert "Pack relocations for mips64""
This reverts commit 6399dcce59.

Bug: http://b/20658994
2015-04-29 17:08:54 -07:00
Dmitriy Ivanov
cb2b3d47ad Revert "Revert "Pack relocations for mips""
This reverts commit d05fd6fc82.

Bug: http://b/20658994
Change-Id: Iccbd4846b310306ed11b87f4566b8aaadfa63ebb
2015-04-29 15:32:10 -07:00
Dimitry Ivanov
b755009325 Merge "Revert "Pack relocations for mips"" 2015-04-29 19:14:17 +00:00
Dimitry Ivanov
dcf8bd8c07 Merge "Revert "Pack relocations for mips64"" 2015-04-29 19:03:56 +00:00
Dimitry Ivanov
6399dcce59 Revert "Pack relocations for mips64"
This reverts commit 8bd30fe3cb.

Bug: http://b/20658994
Change-Id: I6c31094559a12b824344802bf3993f91aee79a26
2015-04-29 18:59:05 +00:00
Dimitry Ivanov
d05fd6fc82 Revert "Pack relocations for mips"
This reverts commit 9dc1a7359f.

Bug: http://b/20658994
Change-Id: Ib10c764a7d06db823ee2fccfa47240e0a639d4bc
2015-04-29 18:57:54 +00:00
Nick Kralevich
100acd1001 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
2015-04-24 21:26:08 -07:00
Dmitriy Ivanov
8bd30fe3cb Pack relocations for mips64
Bug: http://b/18051137
Change-Id: I063c5d6cf007658c0efe9cb1d65ed8026b3e7dae
2015-04-24 16:34:09 -07:00
Dmitriy Ivanov
9dc1a7359f Pack relocations for mips
Bug: http://b/18051137
Change-Id: Id5e0adfb55273f23e1c99b4eecb318c6b8d19989
2015-04-24 12:20:02 -07:00
Dmitriy Ivanov
1d4804ccd1 Pack relocations for x86
Bug: http://b/18051137
Change-Id: I3f316343e9bbd2037a9583d5b6fb41a06be153cd
2015-04-24 10:34:59 -07:00
Dmitriy Ivanov
4c2d1a64fb Pack relocation tables for dynamic executables
Add replocation-packer step for dynmic executables.

  Enable it by default for arm and arm64 platforms.

Bug: http://b/18051137
Change-Id: I0c88fd31595bcea62a087f219acb9ecf9c80f2e5
2015-04-23 12:07:16 -07:00
Dimitry Ivanov
1eca10fa9d Revert "Pack relocation tables for all dynamic executables"
This reverts commit e7a1b8a0c6.

Change-Id: I1a2185e1c68d364941e3b3e525a8c4a7a42e0cc1
2015-04-23 04:22:33 +00:00
Dmitriy Ivanov
e7a1b8a0c6 Pack relocation tables for all dynamic executables
Bug: http://b/18051137
Change-Id: I277277d5f5eb450ef9b4a23cfec16d75d977eb89
2015-04-22 13:30:43 -07:00
Andrew Hsieh
f37e96e232 Merge "Revert "Enable linker -fix-cortex-a53-843419"" 2015-04-13 23:48:28 +00:00
Andrew Hsieh
32e1689684 Revert "Enable linker -fix-cortex-a53-843419"
This reverts commit 54b22a5a70.

Change-Id: I23613490030783fb6da678de5a25f37caebe5f97
2015-04-13 23:39:45 +00:00
Andrew Hsieh
7bd978c2b3 Merge "Enable linker -fix-cortex-a53-843419" 2015-04-13 03:06:50 +00:00
Stephen Hines
69bd465b6e Merge "Don't use -Wl,--fix-cortex-a8 for Cortex A7, A9, A15, Krait or Denver" 2015-04-10 16:17:52 +00:00
Ying Wang
aaf9a5b0cc Remove ancient ranlib workaround on Mac OS X.
Apparently we don't need it for Mac OS X 10.7 and above.

Change-Id: I5ee81700c16e8c66b2d5f2b373fd2d523b5ec018
2015-04-09 10:06:33 -07:00
Andrew Hsieh
54b22a5a70 Enable linker -fix-cortex-a53-843419
Change-Id: Icb8a4ce4d5688847cfe536eba2139cdf7f6406f3
2015-04-09 12:37:36 +08:00
Nick Kralevich
9b44afb452 AndroidConfig.h: ensure HAVE_MALLOC_H always has a value.
Some programs (cough sqlite cough) do an improper check to see if
HAVE_MALLOC_H is defined. Instead of defining it with no value,
define it with a value so those checks pass.

Needed for bug: 20099586

Change-Id: I4c293b2c1b5f4caad85ffc1fc34ac385bab23f5c
2015-04-08 12:21:54 -07:00
Elliott Hughes
98ff711a5d There's no such thing as _THREAD_SAFE.
At least, as far as I can tell from the internet and from grep in /usr/include
on a Mac.

Change-Id: I7f39bb2013db88e59f604e4491344d0d342e5f0b
2015-04-03 13:41:10 -07:00
Elliott Hughes
8a11491bc9 Remove HAVE_PRINTF_ZD.
Change-Id: Ie7677e4816ad886c13a8ac869e7c7342082a350f
2015-04-03 13:05:53 -07:00
Elliott Hughes
dbaee628ec Merge "Remove HAVE_STRLCPY." 2015-04-03 19:42:06 +00:00
Elliott Hughes
8f06d8afb8 Remove HAVE_STRLCPY.
Change-Id: I27864a9075183de5bd83569d53a00fc2f53c96df
2015-04-02 16:43:52 -07:00
Dan Albert
343ed674e3 Use prebuilt libclang_rt.profile.
Bug: 17574078
Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
2015-04-01 19:03:22 -07:00
Christopher Ferris
c9d2952e1e Revert "Switch x86 and x86_64 to 4.9. Attempt #2."
This reverts commit 6fb735b071.

Change-Id: I64b868cdfb3571de5e8b01e4257b5dfa9ee44d0d
2015-03-25 18:27:21 +00:00
Bernhard Rosenkränzer
4da707176b Don't use -Wl,--fix-cortex-a8 for Cortex A7, A9, A15, Krait or Denver
-Wl,--fix-cortex-a8 is a workaround for an Erratum in Cortex-A8
processors. It slightly increases code size and decreases performance,
and there's no point in using it on non-A8 CPUs.

Instead of forcing it unconditionally, use it when targeting
Cortex-A8 or generic armv7-a (which might or might not be A8).

Change-Id: Ifa59765d380445237edccfe5440a67b3ba1e459a
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2015-03-25 17:21:02 +01:00
Alexander Ivchenko
6fb735b071 Switch x86 and x86_64 to 4.9. Attempt #2.
BUG=16407835

Change-Id: I45161bf4701bef4540b51168f771c5e9da8c8750
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
2015-03-20 17:07:34 +03:00
Christopher Ferris
f123057f5e Revert "Switch x86 and x86_64 build to use GCC 4.9"
This reverts commit 533c7aa6a2.

Change-Id: I5203db8454d9af8fb438af6308106945e5dc0dbf
2015-03-17 01:29:51 +00:00
Andrew Hsieh
533c7aa6a2 Switch x86 and x86_64 build to use GCC 4.9
Change-Id: I41a7650d0e56c820a59c261d16afd6f0b9ec38c2
2015-03-16 13:17:59 +08:00
Przemyslaw Szczepaniak
0e2d00ff1f Switch NDK libraries to 4.9 for x86_64 and mips64
Android NDK r10b doesn't even provide 4.8 for those
archs.

Change-Id: I10840c6c7bbc0dd9028a794162d021d8b3e6b19a
(cherry picked from commit fabd383bc8)
2015-03-13 11:36:15 -07:00
Ying Wang
d791463511 Support "LOCAL_FDO_SUPPORT := always".
"LOCAL_FDO_SUPPORT := always" enables FDO without user specifying
"BUILD_FDO_OPTIMIZE := true", i.e. it turns on FDO for a
module in any build configuration.

Change-Id: I05d8db2edb2b3f5db073fa14d5bf1083a04571c0
(cherry picked from commit 45d0143ab1)
2015-03-13 11:36:15 -07:00
Christopher Ferris
62d5e2acf5 Merge "Update x86_64 minimal ISA instruction set" 2015-03-13 04:18:18 +00:00
Mingwei Shi
357778de34 Update x86_64 minimal ISA instruction set
Change-Id: I3ca7f8a0799e6aef09ab1dfb719d218c7338ebf8
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
2015-03-12 22:45:27 +08:00
Ying Wang
168357aeda Merge "Support .asm being compiled by yasm targeted for x86_64." 2015-03-11 16:37:25 +00:00
Ying Wang
fe1e5c3453 Support .asm being compiled by yasm targeted for x86_64.
Change-Id: Ia6425c38dd2f7ad2dc697213cd61b7515b9e7aff
2015-03-09 18:57:40 -07:00
Elliott Hughes
2c5b6ab5ac am 8389deee: Merge "mips64 should avoid common LP64 errors just like arm64 and x86-64."
* commit '8389deee6b355f7dd6b1ff3579179414c6a41e5c':
  mips64 should avoid common LP64 errors just like arm64 and x86-64.
2015-02-25 19:01:07 +00:00
Elliott Hughes
d1ea5fbf7b mips64 should avoid common LP64 errors just like arm64 and x86-64.
Change-Id: Ibce5863bee3175671862c1889869b43bcb39a074
2015-02-24 16:04:31 -08:00
Elliott Hughes
36f179711d am ca15af1b: Merge "Turn on -Werror=implicit-function-declaration for arm64."
* commit 'ca15af1bcde972b6ba3546d45913c9bb51bd93b0':
  Turn on -Werror=implicit-function-declaration for arm64.
2015-02-23 21:35:17 +00:00
Elliott Hughes
ca15af1bcd Merge "Turn on -Werror=implicit-function-declaration for arm64." 2015-02-23 21:29:58 +00:00
Elliott Hughes
5081cbf009 am faeae397: Merge "Turn on -Werror=implicit-function-declaration for x86-64."
* commit 'faeae3977159b0b4ca2021c4c657a090eaeb4a56':
  Turn on -Werror=implicit-function-declaration for x86-64.
2015-02-23 18:29:13 +00:00
Elliott Hughes
faeae39771 Merge "Turn on -Werror=implicit-function-declaration for x86-64." 2015-02-23 18:23:24 +00:00
Elliott Hughes
f5e204b3f4 Turn on -Werror=implicit-function-declaration for arm64.
Implicit function declarations are much more dangerous on LP64 because
sizeof(int) != sizeof(void*), so any function that returns a pointer will
lose its top bits, leading to relatively hard to debug crashes.

Change-Id: Ia05beffb949ca747833c2e12c40daf896f7a60a5
2015-02-21 13:21:20 -08:00
Elliott Hughes
b97d8c78e2 Turn on -Werror=implicit-function-declaration for x86-64.
Implicit function declarations are much more dangerous on LP64 because
sizeof(int) != sizeof(void*), so any function that returns a pointer will
lose its top bits, leading to relatively hard to debug crashes.

Change-Id: Ib2570326dde1b1cde09c63c9b4c973d741528ee2
2015-02-21 11:01:11 -08:00