Commit graph

660 commits

Author SHA1 Message Date
Stephen Hines
dc64c7b460 Switch to hermetic GCC 4.8.3-based x86_64-w64-mingw32-4.8 compiler.
Bug: 14416410

prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32
is the location for the checked-in hermetic mingw Windows compiler. This
removes our reliance on host mingw when building with "make win_sdk".

Change-Id: I1f9bbb85912d9855be32f9cab4bdfd12d6d3246c
2014-09-30 02:38:41 -07:00
Alexander Ivchenko
4ee006e012 Refine TARGET_GLOBAL_CFLAGS for x86 and x86_64:
Remove -msse2 for x86 (-mssse3 should be provided by the compiler).
       Remove -fPIC (compiler provides by default).
       Remove -fno-inline-functions-called-once.

Change-Id: Ibb29934224c4eedfff926dc72c3b6342c1861ac9
(cherry picked from commit 388dce3192)
2014-09-10 11:50:21 -07:00
Andrew Hsieh
360b851034 Change mips64 default to mips64r6 from mips64r2
Also add back mips flags previously can't be handled by clang

See aosp/build
  13066a8d4c
  10326b3d7f

Change-Id: Iedc8dadd24f72fbd9c5589eec34677c1827290f3
2014-09-04 19:01:22 -07:00
Dehao Chen
f4294cd816 Add TARGET_FDO_LDFLAGS to make sure -lgcc is always linked after -lgcov.
Change-Id: I33a94abe58391a8564ada14417b0158ddd7ed2d6
2014-08-20 16:48:17 -07:00
Dehao Chen
4e8f2ea6e8 Check existance of profile directory for specific device.
Change-Id: I149c257e98c8483b79f2afc1e5b871731f6f6519
2014-08-18 09:43:42 -07:00
Dan Albert
04cf315970 Inhibit implicit -Bsymolic in -shared.
Bug: 16853291

Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
(cherry picked from commit b6bb71b85d)
2014-08-08 08:15:19 -07:00
Dan Albert
908ab54fda Fix uses of -fPIC and -fPIE.
We've been using -fPIC and -fPIE together in the global cflags all this
time. These options are incompatible. The only reason we haven't been
hit by this before is because of the forced -Bsymbolic in GCC. To fix
this, pass -fpic when compiling objects for shared libraries and -fpie
when compiling objects for executables. For static libraries, also use
-fpic. We have to do this because static libraries might be included in
either a shared library or an executable. Code compiled with -fpie
cannot be included in a shared library, but code compiled with -fpic
may be included in an executable.

We've also been using -fpic and -fPIC together. These are different
options, and only the latter will take effect.
http://stackoverflow.com/a/967010

The final thing this fixes is that we had -f(PIC|PIE) flags being passed
to link commands. These are compile time flags, and don't do anything at
link time.

Bug: 16823325
Change-Id: Ic76f47e63dc2c81b7e1a8058bae1b3dc8565d606
(cherry picked from commit 4803ce2696)
2014-08-08 08:15:14 -07:00
Dehao Chen
da26f200bd Change profile use path to the newly created project.
Change-Id: I3221a3b18e16d6a50cbc561c9cae1d1ab3999090
2014-08-05 15:32:41 -07:00
Duane Sand
02f285208c [MIPSR6] Add mips64r6 and mips32r6 targets
Add mips64r6 target and corresponding mips32r6 target.
Defaults remain as mips64r2 and mips32r2.

Apply -FP64A codegen subsetting to mips32r6 only.
Access FR=0 odd-numbered 32-bit float regs only via
double-prec even-numbered regs, not by single-prec ops.

(cherry picked from commit 6bab974cdc)

Change-Id: I447337ce56c15e86cec505d68a6b45294fc3ba77
2014-08-05 12:39:28 -07:00
Duane Sand
1d04a53ba3 [MIPS64] Enable mips64 clang
(cherry picked from commit 41ca444637)

Change-Id: I0b141c58c88fe86e3a59844f53acc9a0e0a5271c
2014-08-05 12:38:31 -07:00
Duane Sand
3c4fcd8451 [MIPS] Unite mipsel and mips64el 4.9 gcc toolchains
Use 4.9 mips64el toolchain for both 64- and 32-bit builds.
Tell ld when 32-bit links are required.
Override 4.9's changed defaults for mips floating point
register use, to get same assembler rules as 4.8 and earlier.

Also: drop unused  soft-fp build targets, cleanout redundant
compiler options, and remove extraneous Android.mk file.

(cherry picked from commit 6670e24aed)

Change-Id: I34d2f8fc6113c9d1670e3acff1aff48634b9fe1b
2014-08-05 12:28:44 -07:00
Dehao Chen
e43c96c332 Merge "Update the FDO support:" into lmp-dev 2014-07-29 21:36:00 +00:00
Dehao Chen
5f5c48f0f1 Update the FDO support:
* Explicitly check BUILD_FDO_INSTRUMENT and BUILD_FDO_OPTIMIZE with true
* Remove unnecessary target_libgcov
* Update the profile collection path on device so that most app can have write access

Change-Id: I5c1915a12ea37b2cb3c76a27e7104e47ad636928
2014-07-30 16:54:55 -07:00
Ying Wang
b169fb7822 Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
This reverts commit a4f84fdfed.
Added "export CCACHE_CPP2 := true" to work around ccache bug with clang.
See:
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html

Change-Id: I2b1fa8fd59c3a113c4028a92a1d16018133c9792
2014-07-30 10:14:37 -07:00
Stephen Hines
e9bf1bdac6 Merge "Default to "prescott" as our baseline i686 host build architecture." into lmp-dev 2014-07-24 22:43:15 +00:00
Przemyslaw Szczepaniak
ac6a9195ca Switch NDK arm64 libraries to 4.9.
Change-Id: Iffc30e34b798896d9259ca1dfc3ff2d21683d6a4
(cherry picked from commit 5895dd13a7)
2014-07-25 13:44:34 +00:00
Stephen Hines
76bd60b7da Default to "prescott" as our baseline i686 host build architecture.
Bug: 16408818

Change-Id: I41760605bf9f4589859afd20cc96ccbedb6fe82c
2014-07-25 00:42:14 -07:00
Dehao Chen
25671e15cc Refactor FDO support code to ensure arm64 can also be built with FDO.
Change-Id: I752c9f411b0a046a15c72b4837efc1fb0503b470
2014-07-23 16:23:46 -07:00
Ed Heyl
f6771f631b reconcile aosp (8689b90bcf) after branching. Please do not merge.
Change-Id: I0e4c55cc5a04d4593c3cd200c08c48d18c08a161
2014-07-14 23:32:28 -07:00
Ying Wang
26dbc3e6e4 am d3b5d574: am ce40d5f9: am bc7501e1: Merge "More consistent use of 64-bit build variable."
* commit 'd3b5d574defd565d6e810cbb86e3943837f94065':
  More consistent use of 64-bit build variable.
2014-07-09 15:07:12 +00:00
Ying Wang
d3b5d574de am ce40d5f9: am bc7501e1: Merge "More consistent use of 64-bit build variable."
* commit 'ce40d5f99e9c0658aab9539bf8afa253dfd985e4':
  More consistent use of 64-bit build variable.
2014-07-09 12:36:30 +00:00
Ying Wang
4b1c95d8d2 More consistent use of 64-bit build variable.
Set up TARGET_IS_64_BIT and HOST_IS_64_BIT early so we don't need 2
mechanisms to judge if it's 64-bit build;
Remove the unnecessary 32-bit host variables.

Change-Id: I08d6d4d9ea70f91135fe2ee05463fb9a0d1cee42
2014-07-08 18:04:17 -07:00
Dan Albert
8f73aeea87 am 183f90f4: am 3ffcf184: Merge "Remove -Bsymbolic from builds."
* commit '183f90f40ce9e0fafa563dfaf1fb4450cb98168c':
  Remove -Bsymbolic from builds.
2014-07-08 18:55:55 +00:00
Dan Albert
3ffcf184bc Merge "Remove -Bsymbolic from builds." 2014-07-08 18:09:01 +00:00
Dan Albert
9d8d20a1e1 am 8f73aeea: am 183f90f4: am 3ffcf184: Merge "Remove -Bsymbolic from builds."
* commit '8f73aeea87f96d715ca2f39a35fd73986feecceb':
  Remove -Bsymbolic from builds.
2014-07-08 18:59:48 +00:00
Ying Wang
e68ec71903 [DO NOT MERGE] Workaround to fix klp-modular-dev-plus-aosp build.
Change-Id: I8042b045f20b870de84ea7c4c060c3cbe1cdfe69
2014-07-02 14:26:49 -07:00
Elliott Hughes
0635498086 am 3a2f6ecf: am 491871aa: am 4b7ba417: Merge "Add -Wl,--fatal-warnings to x86_64."
* commit '3a2f6ecf3f7af6819b601645334d4c563401d37a':
  Add -Wl,--fatal-warnings to x86_64.
2014-06-30 23:04:35 +00:00
Elliott Hughes
3beb51692e Add -Wl,--fatal-warnings to x86_64.
Bug: 11358761
Change-Id: I0c86a2ce3f95e89cc6c6eed65f3595922a90f45f
2014-06-30 14:52:30 -07:00
Elliott Hughes
7ec725d41f resolved conflicts for merge of 53caaaf6 to master
Change-Id: I20d265364b09c64d3637e57f500e934ee2310887
2014-06-16 15:34:25 -07:00
Elliott Hughes
bfe62fc30c Remove unused hosts.
Nobody is using freebsd-x86 or linux-ppc.

Change-Id: I4e19fd32d92b39ad574001e7046e37ccd2300a2e
2014-06-16 14:48:59 -07:00
Dan Albert
50031de36e Remove -Bsymbolic from builds.
This is causing issues when tools like asan try to wrap calls like
malloc. See the referenced bug for more details.

Bug: 15432753
Change-Id: I15e8eab5b773afd02dc14c78500cf8246a617718
2014-06-13 10:24:12 -07:00
Elliott Hughes
fd40d060d9 am 7f880d15: am 553c289a: am 624220c1: Merge "Remove useless stuff from "AndroidConfig.h"."
* commit '7f880d15da4c73889833087161e4c05b55ef07fe':
  Remove useless stuff from "AndroidConfig.h".
2014-06-13 00:48:36 +00:00
Elliott Hughes
e82d33d997 Remove useless stuff from "AndroidConfig.h".
The futex wrappers and memcmp16 are no longer available to anyone.
No one was checking for the existence of the SA_NOCLDWAIT constant,
and even if they wanted to, they could just check directly.

Change-Id: If8ac6c2617b76b23a2450f58fc03453f7f82a61f
2014-06-12 15:36:52 -07:00
Ying Wang
dd4db3058a am 56ec31cf: am 3fe9a277: am d0f0918b: Merge "Reenable ccache."
* commit '56ec31cfca1ed5f9d833d73c327b2799601cd5a4':
  Reenable ccache.
2014-06-06 18:43:44 +00:00
Ying Wang
67ed25f3a6 Reenable ccache.
The previous commit 994c84fb virtually disabled ccache, due to the
deferred evaluation of CC_WRAPPER/CXX_WRAPPER.

Change-Id: Ie0d70a23a55190bd9b24b72edc9158b6976e1d5d
2014-06-06 11:18:04 -07:00
Primiano Tucci
454de52c96 Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to the compiler.
This is to make it possible to wrap the compiler invocations with
custom wrappers (e.g., distcc/goma) by setting the CC_WRAPPER,
CXX_WRAPPER, JAVAC_WRAPPER variables in the build environment (without
having to know in advance the path to the compiler)

(cherry-picked from AOSP 994c84fb40)

Change-Id: Ide800c24f0c2ebbb1cfb358bd8f99ec8a9d41253
2014-06-03 12:24:22 +01:00
Primiano Tucci
994c84fb40 Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to the compiler.
This is to make it possible to wrap the compiler invocations with
custom wrappers (e.g., distcc/goma) by setting the CC_WRAPPER,
CXX_WRAPPER, JAVAC_WRAPPER variables in the build environment (without
having to know in advance the path to the compiler)

Change-Id: Ide800c24f0c2ebbb1cfb358bd8f99ec8a9d41253
2014-06-02 20:12:57 +01:00
Stephen Hines
88bd5edaa4 am 15d49c3b: am 85e0dce5: am a8b65126: Merge "Add -shared to clang LDFLAGS."
* commit '15d49c3b30d320422d0209c8726eb0c5cec92d41':
  Add -shared to clang LDFLAGS.
2014-05-30 23:15:43 +00:00
Nick Kralevich
43c36c8201 am ee7493cc: am 329988c2: am a42e0f50: Merge "arm64: restore relro/now"
* commit 'ee7493ccb91256e61414e8e0bad8d7173cb5d22e':
  arm64: restore relro/now
2014-05-30 23:02:54 +00:00
Stephen Hines
a8b65126ca Merge "Add -shared to clang LDFLAGS." 2014-05-30 22:59:48 +00:00
Nick Kralevich
45545761d2 arm64: restore relro/now
The bug which required this option has been fixed.

Bug: 11434996
Change-Id: I7ab7e2e8ba7b993281902832d01b3ee3ba9e06ef
2014-05-30 15:46:40 -07:00
Andrew Hsieh
4e5c08d420 am fb0a19d6: am dc41aa32: am 5c2c70de: Merge "Add -latomic to all target builds"
* commit 'fb0a19d603b0f2c00ec3491a39d37103496cbca9':
  Add -latomic to all target builds
2014-05-30 11:50:52 +00:00
Tim Murray
0f9276d4ba Add -shared to clang LDFLAGS.
TOT clang doesn't do the right thing with regards to -pie without this.

Change-Id: Ic14cfb25d96359eb18899c09ebaf1d311e937d01
2014-05-29 17:54:07 -07:00
Andrew Hsieh
4c952d72b7 Add -latomic to all target builds
Projects using stdatomic.h needs libatomic.a in case compiler can't
expand all __atomic* intrinsics. eg, __atomic_is_lock_free in
armeabi/mips.

Adding libatomic.a globally makes more sense than adding
"LOCAL_LDLIB += -latomic " in each project including <stdatomic.h>.
Projects don't need atomic operations won't get redundant DT_NEEDED
entry because libatomic.a is not a shared library.

Change-Id: I81dbf524544c848e667e18ab5eeabff75b5063ef
2014-05-29 11:40:46 -07:00
Dan Albert
49df673669 am cd74f307: am a5b0b130: am 3805f619: Merge "Revert "Fix for duplicate names in whole static libs""
* commit 'cd74f3073c4d0fa7d566705b0eb38c635c1c9344':
  Revert "Fix for duplicate names in whole static libs"
2014-05-27 19:50:55 +00:00
Dan Albert
3805f61915 Merge "Revert "Fix for duplicate names in whole static libs"" 2014-05-27 19:41:46 +00:00
Dan Albert
3c12b5c02b Revert "Fix for duplicate names in whole static libs"
This reverts commit 0e5ce8be34.

Change-Id: I68b776cb915fd7be8299ddb2899907046dddadf3
2014-05-27 19:30:36 +00:00
Dan Albert
d8303d9021 am e6918b55: am 212772f6: am 31101623: Merge "Fix for duplicate names in whole static libs"
* commit 'e6918b559d911fd58dc03b60e4b866b23c935f72':
  Fix for duplicate names in whole static libs
2014-05-27 18:33:19 +00:00
Dan Albert
31101623b3 Merge "Fix for duplicate names in whole static libs" 2014-05-27 18:23:26 +00:00
Ying Wang
bccdab8737 am 65475feb: am 29267309: am 294301bb: Merge "Exclude libstdc++ and libgcc if libc++ is requested."
* commit '65475feb5999068096b287faac9199d1c8e18340':
  Exclude libstdc++ and libgcc if libc++ is requested.
2014-05-27 17:59:11 +00:00