Commit graph

297 commits

Author SHA1 Message Date
Andrew Hsieh
a5b28e2d92 am 267b07b2: am 7176e801: Merge "Add TARGET_GCC_VERSION"
* commit '267b07b2aafede64d212402c3554fc2888821c98':
  Add TARGET_GCC_VERSION
2012-10-23 17:29:45 -07:00
Andrew Hsieh
267b07b2aa am 7176e801: Merge "Add TARGET_GCC_VERSION"
* commit '7176e8013bb2e563c3e3e56af4c04c50de3a7f37':
  Add TARGET_GCC_VERSION
2012-10-23 17:15:01 -07:00
Andrew Hsieh
06b63baedc Add TARGET_GCC_VERSION
Default to 4.6, but can overwritten to something else in
prebuilts/gcc/$os/$arch/$arch-linux-android*-$ver

Change-Id: I16f99d642b8ff8e831d392261a0c536041107051
2012-10-23 12:06:01 +08:00
Nick Kralevich
24903f02c8 am 7c56556d: am d883749e: Merge "x86: add --warn-shared-textrel"
* commit '7c56556d183c7103bdd58884071fdb134eb82956':
  x86: add --warn-shared-textrel
2012-10-22 11:06:18 -07:00
Nick Kralevich
7c56556d18 am d883749e: Merge "x86: add --warn-shared-textrel"
* commit 'd883749e600a34b5eb4db542d24946b25aa5c9fb':
  x86: add --warn-shared-textrel
2012-10-22 11:04:24 -07:00
Nick Kralevich
4f2f16da14 x86: add --warn-shared-textrel
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.

This warning will turn into an error in a future change
(via --fatal-warnings)

Change-Id: I2d169c7ce3600d02e25591f3ec15aba363730298
References: http://www.akkadia.org/drepper/textrelocs.html
2012-10-19 13:36:49 -07:00
Nick Kralevich
077007e872 arm: turn on -Wl,--fatal-warnings
Third time's the charm.  :-)

In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation.  At the time, we wrote:
=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====

All code which uses text relocations has either been fixed, or
we've temporarily worked around the issue so the code can still
compile.

Enable --fatal-warnings.

This reverts commit 942167dab8.

Change-Id: I578701692ead7e7cd60d73d2070a5bed366e2c6c
2012-10-19 08:40:56 -07:00
Nick Kralevich
942167dab8 Revert "arm: turn on -Wl,--fatal-warnings"
This reverts commit 3ab011bccd.
2012-10-18 14:03:49 -07:00
Nick Kralevich
3ab011bccd arm: turn on -Wl,--fatal-warnings
In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation.  At the time, we wrote:
=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====

All code which uses text relocations has either been fixed, or
we've temporarily worked around the issue so the code can still
compile.

Enable --fatal-warnings.

This reverts commit 4dc781657b.

Change-Id: I81b96477f1c11069637f28cfd8fb98d42b39be5e
2012-10-18 12:03:30 -07:00
Nick Kralevich
4dc781657b Revert "arm: turn on -Wl,--fatal-warnings"
This reverts commit edfee7250f.
2012-10-16 13:51:02 -07:00
Nick Kralevich
edfee7250f arm: turn on -Wl,--fatal-warnings
In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation.  At the time, we wrote:

=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====

We've successfully removed all text relocations from Android's
compiled code, so turn on -Wl,--fatal-warnings .
Some pre-compiled shared libraries continue to have text relocations,
but they will be unaffected by this change.

Change-Id: I505ea23120048afc45f62593704fe1d6d26a352c
2012-10-15 11:22:31 -07:00
Ying Wang
15f116b2bb am 91fd1231: Support to build executables against the NDK
* commit '91fd1231c3254bc9d0642e5a646b5657bdaedffa':
  Support to build executables against the NDK
2012-10-08 14:21:37 -07:00
Ying Wang
91fd1231c3 Support to build executables against the NDK
Use "LOCAL_SDK_VERSION := <number>" to build against the NDK when you
include $(BUILD_EXECUTABLE).

Bug: 7170098
Change-Id: I4cebeae3355e79a4d2f2f5549ef0613ced77e3f0
2012-10-08 14:12:41 -07:00
Nick Kralevich
6b1ac2588a am 23025ecd: am f3b02739: am 7653519f: Merge "[MIPS] Makes a build system use PIE flag"
* commit '23025ecdc0890e9262951627defda77e621fd9e8':
  [MIPS] Makes a build system use PIE flag
2012-10-04 17:17:11 -07:00
Nick Kralevich
23025ecdc0 am f3b02739: am 7653519f: Merge "[MIPS] Makes a build system use PIE flag"
* commit 'f3b02739a7abba7c8f4884d49553f8a9f3fcfaf8':
  [MIPS] Makes a build system use PIE flag
2012-10-04 17:14:17 -07:00
Ian Rogers
e88d5af2ab am 318330dd: am 9acbbf12: am 76a6dc3a: Fix common typo in comments, warning and error messages.
* commit '318330dd920977733f20eeda338d3c36892373f6':
  Fix common typo in comments, warning and error messages.
2012-10-01 17:28:18 -07:00
Ian Rogers
76a6dc3a19 Fix common typo in comments, warning and error messages.
s/can not/cannot/g

Change-Id: I1bac31157732666deb46f6f20389ff539977ffb9
2012-10-01 16:36:23 -07:00
Miroslav Ignjatovic
f1e4df7265 [MIPS] Makes a build system use PIE flag
Change-Id: I07be4e8ae559dca615b0c59a71d7363adab4f49b
2012-09-27 13:59:15 -07:00
Ying Wang
c6ffc00b9f Support to build executables against the NDK
Use "LOCAL_SDK_VERSION := <number>" to build against the NDK when you
include $(BUILD_EXECUTABLE).

Bug: 7170098
Change-Id: I4cebeae3355e79a4d2f2f5549ef0613ced77e3f0
2012-09-25 18:33:53 -07:00
Ying Wang
5bdf305bbe 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
2012-09-20 10:33:20 -07:00
Andrew Hsieh
5630521aba resolved conflicts for merge of 3e91f5ad to jb-mr1-dev
Change-Id: I9b587bc6086e1edacc98879e43668001bf72f7db
2012-09-12 15:27:59 -07:00
Andrew Hsieh
c2fb2391f4 Enable stack-protector for x86
Change-Id: I7a169075ca49ab831c37625d416c1d4b026bfec3
2012-08-29 15:13:23 +08:00
Jean-Baptiste Queru
d4ace13802 am 4dc6ed96: am 9eb87b8d: Merge "Add pattern to check for GCC 4.6"
* commit '4dc6ed96a0612d4693cca5ed5674873754bcb37e':
  Add pattern to check for GCC 4.6
2012-08-28 13:41:09 -07:00
Jean-Baptiste Queru
d5096c6a5c resolved conflicts for merge of 5c903372 to jb-mr1-dev
Change-Id: I4994c77a6570ce654915bfb8c5f6ee4583db86b7
2012-08-28 13:40:19 -07:00
Jean-Baptiste Queru
9eb87b8d20 Merge "Add pattern to check for GCC 4.6" 2012-08-28 12:47:34 -07:00
Jean-Baptiste Queru
9e2b4718a0 Merge "Use gold linker on x86" 2012-08-28 12:27:21 -07:00
Pavel Chupin
b205b46153 Use gold linker on x86
Patch removes fallback -fuse-ld=bfd for x86 target and
--copy-dt-needed-entries which is not supported by gold linker.

Change-Id: Ie5603f98e3f2f9d4f81678c718e39b130a75d057
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-08-28 13:10:18 +04:00
Andrew Hsieh
26c7805781 Add pattern to check for GCC 4.6
GCC 4.6 --version can return 4.6.x-google but also simply 4.6
as of https://android-review.googlesource.com/#/c/42028.
Add more pattern to detect it.

Change-Id: Ibf34fba9afdf01bd3eafc011cc4d059b59f25d3d
2012-08-28 10:49:05 +08:00
Jean-Baptiste Queru
414d7e859a am dbf6ad06: am 713bac96: Merge "ARM: put crtbegin_so.o at the beginning where it belongs"
* commit 'dbf6ad0692f98cacf27dc023854b2c5a5575a841':
  ARM: put crtbegin_so.o at the beginning where it belongs
2012-08-24 13:06:42 -07:00
Jean-Baptiste Queru
713bac96d6 Merge "ARM: put crtbegin_so.o at the beginning where it belongs" 2012-08-24 13:00:10 -07:00
Jean-Baptiste Queru
cd9668edd4 am e3479ea5: am 15012c11: Merge "Build on Mac OS X : add experimental SDK versions"
* commit 'e3479ea5033e2ede36f6f771dd3a6ea315505efd':
  Build on Mac OS X : add experimental SDK versions
2012-08-22 09:57:30 -07:00
Jean-Baptiste Queru
15012c115d Merge "Build on Mac OS X : add experimental SDK versions" 2012-08-22 09:44:48 -07:00
SangWook Han
691e0243ca Build on Mac OS X : add experimental SDK versions
Change-Id: Ifc67d1745e72fc048cd6e8c8ef0521ab92468086
2012-08-22 02:59:58 +09:00
Ard Biesheuvel
6c1f9ccfb1 ARM: put crtbegin_so.o at the beginning where it belongs
Change-Id: I9466fe9277c58a7b8f8a9964b2d578a65e579995
2012-08-21 10:42:32 +02:00
Andrew Hsieh
31ef1037bf 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
2012-08-21 14:40:16 +08:00
Ying Wang
732b2ba79a Merge "Don't include system/core/include/arch/<arch>/Android.mk for apps-only build." into jb-mr1-dev 2012-08-16 16:51:00 -07:00
Ying Wang
da4bf42514 Don't include system/core/include/arch/<arch>/Android.mk for apps-only build.
Bug: 6994483
Change-Id: I76c4d96264cf94a79d59fdeb52bb37c07a9458dd
2012-08-16 16:45:01 -07:00
Jean-Baptiste Queru
2f32c04d8c am d77d8906: am 6020d698: Merge "select.mk: Tune ccache options"
* commit 'd77d8906b8fc4a6e2ecaf9bc5f5b84ddec6dbe7e':
  select.mk: Tune ccache options
2012-08-16 15:28:47 -07:00
Andrew Boie
1f93043c86 select.mk: Tune ccache options
With these adjustments, cached object files can now be shared across
multiple Android trees on a single workstation:

* Compiler binary modification time no longer causes cache misses,
  as a hash of the compiler binary is taken rather than looking
  at the mtime and size
* Header file modification time no longer causes cache misses,
  the headers are now always hashed
* Macros such as __DATE__ and __TIME__ no longer cause cache misses
* All paths in preprocessed source (due to use of -g) are now relative

These options require ccache 3.1 or later to be used; ccache 2.4 will
ignore these.

Change-Id: I7839637e9dacf7240bd9b7bfaa6406b1db423560
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-08-16 11:11:29 -07:00
Keun young Park
a8811fda4f fix MIPS build
- crtxx.o built under TARGET_OUT_INTERMEDIATE_LIBRARIES,
  not under TARGET_OUT_STATIC_LIBRARIES

Change-Id: Ife05206bd66f691853100bbf17e08a13c287d073
2012-08-15 13:42:37 -07:00
Elliott Hughes
880d3f39f7 resolved conflicts for merge of 0ac38a4e to jb-mr1-dev
Change-Id: I0978f511f807797f89be4002bca654492231761c
2012-08-11 12:00:51 -07:00
Elliott Hughes
5f6c7fd884 Remove TARGET_linux-sh.mk.
SH support is long gone from bionic and dalvik.

Change-Id: I613df5f0062d743686847610737af9a321eec1da
2012-08-10 15:36:51 -07:00
Nick Kralevich
62481e30f3 Merge "arm: add --warn-shared-textrel" into jb-mr1-dev 2012-08-10 14:11:14 -07:00
Nick Kralevich
b238210c01 arm: add --warn-shared-textrel
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.

This warning will turn into an error in a future change
(via --fatal-warnings)

References: http://www.akkadia.org/drepper/textrelocs.html

Change-Id: I3bc818e3ecdb8a4338668a9e816b6dc1081b7557
2012-08-10 13:05:53 -07:00
Jean-Baptiste Queru
c244634e8f am 64b8c6e9: am 6e6d92c4: Merge "Support for MIPS Build targets."
* commit '64b8c6e936ae713a61c53a85a0badbd7d480e414':
  Support for MIPS Build targets.
2012-08-10 12:43:58 -07:00
Raghu Gandham
06afc1c5ab Support for MIPS Build targets.
Change-Id: I14c27305298ce36d5c100abf25489275c2269c5f
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Raghu Gandham <raghu@mips.com>
2012-08-01 11:18:25 -07:00
Andrew Hsieh
f116e9bc84 Add -fuse-ld=bfd to x86 target
Add -fuse-ld=bfd because ld.gold doesn't support "--copy-dt-needed-entries".

Change-Id: I4e78967a076b3d093dd55366f7a54f0c9f9a45d1
2012-07-25 11:06:28 -07:00
Andrew Hsieh
bae121afcd Add -fuse-ld=bfd to x86 target
Add -fuse-ld=bfd because ld.gold doesn't support "--copy-dt-needed-entries".

Change-Id: Ie6fa0a2ddfc57b650552c8cf0891f738a5be0dda
2012-07-25 11:02:52 -07:00
Ying Wang
dfb5818027 am d512fda4: am e42ed0ba: Merge "Move the llvm-gcc warning from HOST_darwin-x86.mk to main.mk"
* commit 'd512fda4ae7cc56cc9b83fcb6e7a9e0d0f02c259':
  Move the llvm-gcc warning from HOST_darwin-x86.mk to main.mk
2012-06-29 20:22:20 -07:00
Ying Wang
d512fda4ae am e42ed0ba: Merge "Move the llvm-gcc warning from HOST_darwin-x86.mk to main.mk"
* commit 'e42ed0ba1571f20866609710ba7c73fd138c0405':
  Move the llvm-gcc warning from HOST_darwin-x86.mk to main.mk
2012-06-29 20:19:50 -07:00