Commit graph

244 commits

Author SHA1 Message Date
Ying Wang
85e8cda340 Remove the obsolete comments and change the misleading var name.
Change-Id: Ib19099cbce0133f5c7df44fa0fd80215809a1ad8
2012-11-12 14:31:20 -08:00
Andrew Hsieh
e2e28f6d02 Use prebuilt gcc for MacOSX
1. Use prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1
   See https://android-review.googlesource.com/#/c/46223/
2. Rewrite logic dealing with mac_sdk_version to support all
   MacOSX SDK 10.6, 10.7 and 10.8.  Note that since
   ad2342375963c2468849c1f83a97158383db6511 emulator no longer
   depends on 10.6 to build.  Since the lowest SDK among intersection
   of the "available" and the "supported" SDKs is picked, add a
   new variable MAC_SDK_VERSION for developer really want to overwrite
   it.  MAC_SDK_VERSION still has to be one of the supported, though.
3. Improve mac_sdk_path detection to deal with case where Xcode
   *dmg is mounted only, not installed at /Applications.
4. Now we can retire BUILD_MAC_SDK_EXPERIMENTAL

Change-Id: I83e463556a857d527710f766de0e19e1b576151f
2012-11-12 10:44:52 -08:00
Elliott Hughes
07a6db8733 Remove manual WITH_JIT setting from build/.
This is now done automatically by dalvik/, since
patch 272a54f8553e13b87bf819542ddc6701fc1232cc.

Change-Id: I57709538f20188417c014630442e897401d7ace0
2012-11-06 16:41:52 -08: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
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
Miroslav Ignjatovic
f1e4df7265 [MIPS] Makes a build system use PIE flag
Change-Id: I07be4e8ae559dca615b0c59a71d7363adab4f49b
2012-09-27 13:59:15 -07:00
Andrew Hsieh
c2fb2391f4 Enable stack-protector for x86
Change-Id: I7a169075ca49ab831c37625d416c1d4b026bfec3
2012-08-29 15:13:23 +08: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
713bac96d6 Merge "ARM: put crtbegin_so.o at the beginning where it belongs" 2012-08-24 13:00:10 -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
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
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
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
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
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
Ying Wang
478ba5e3f0 Move the llvm-gcc warning from HOST_darwin-x86.mk to main.mk
Bug: 6754632
So the warning won't show up when you run lunch.
Now the warning only shows when you do a clean build.

Change-Id: I7876da783f059d390f0072df37d3ab0291589eb7
2012-06-28 16:02:19 -07:00
Jean-Baptiste Queru
6e207824af resolved conflicts for merge of 572d0d7d to jb-dev-plus-aosp
Change-Id: I6c750adcf06457bf8a3b47423c990be6e9d23bbb
2012-06-13 07:42:04 -07:00
Jean-Baptiste Queru
3f8ff030e0 Merge "x86: Clean up atom vs/ non-atom compiler flags, enable SSSE3" 2012-06-13 06:25:00 -07:00
Jean-Baptiste Queru
06b1a47fe1 am d3d78a30: am a11ad6c2: Merge "gcc 4.6 requires --copy-dt-needed-entries"
* commit 'd3d78a30a4f8dd40fa055577ea2708ab34606cec':
  gcc 4.6 requires --copy-dt-needed-entries
2012-06-12 15:52:54 -07:00
Jean-Baptiste Queru
a11ad6c2b3 Merge "gcc 4.6 requires --copy-dt-needed-entries" 2012-06-12 15:24:17 -07:00
Ying Wang
5c0ee702d6 am 79d39a30: am 874563f9: Merge "Fix generic build on Max OS X 10.7 Lion"
* commit '79d39a303e036dc70eccf2e2e7489fa0bbfd3a4b':
  Fix generic build on Max OS X 10.7 Lion
2012-06-08 09:27:08 -07:00
SangWook Han
02eb37c267 Fix generic build on Max OS X 10.7 Lion
Recover variable build_mac_version which is removed on
    commit 644dc16 and added on commit 9ce06f1.

    Without this, ranlib libSDL.a is executed on Lion which
    causes build fail of emulator-arm.

Change-Id: I06144a288921f8f968ef457999398c1b9152d4aa
2012-06-08 14:55:05 +09:00
Ying Wang
f1e424a636 am 3da13457: am 4b030617: Merge "XCode 4.3+ compatibility check-in"
* commit '3da13457cfa46cf7d46b57c00f387c7c310b2dba':
  XCode 4.3+ compatibility check-in
2012-06-07 12:02:06 -07:00
Al Sutton
51f9bb02da XCode 4.3+ compatibility check-in
XCode 4.3 and later use a different location for SDKs. This check in
ensures the build checks for the new location as well as the old one.

Change-Id: I97884e5009f229f8b42e57a8feeb702b3a40a241
Signed-off-by: Al Sutton <al@funkyandroid.com>
2012-06-07 19:10:13 +01:00
Ying Wang
9f4d00b94b am e534e2eb: am 47450542: Merge "Use Mac OS X SDK 10.6."
* commit 'e534e2eb2b5e79facf24c31eb2f60b8a0ee1f5b7':
  Use Mac OS X SDK 10.6.
2012-06-05 15:25:39 -07:00
Ying Wang
644dc164cc Use Mac OS X SDK 10.6.
Change-Id: I8ca16db2fb93d350829e14f4339e7ece75a2fb54
2012-06-05 14:23:22 -07:00
Bruce Beare
c3192b3164 x86: Clean up atom vs/ non-atom compiler flags, enable SSSE3
Change-Id: I0576514621affefea86a14d419f428761a60e067
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-05-25 09:59:25 -07:00
Bruce Beare
52b63178d9 gcc 4.6 requires --copy-dt-needed-entries
Change-Id: Icc62106e0f2e96f4cd871bb4b3c46c7ca83cabec
Author: Bruce Beare <bruce.j.beare@intel.com>
Reviewed-by: Lu, Hongjiu <hongjiu.lu@intel.com>
2012-05-25 09:27:23 -07:00
Andrew Hsieh
6dfe3e11a5 Merge "Set generic_x86/BoardConfig.mk TARGET_ARCH_VARIANT to x86" into jb-dev-plus-aosp 2012-05-21 18:51:52 -07:00
Jean-Baptiste Queru
99e1613fd5 am 72b329e5: am 3c5191c6: Merge "Update build rule for executable with PRIVATE_ALL_WHOLE_STATIC_LIBRARIES"
* commit '72b329e5042b8fc15cbcbea3d382a072f79eb961':
  Update build rule for executable with PRIVATE_ALL_WHOLE_STATIC_LIBRARIES
2012-05-21 08:10:26 -07:00
Jean-Baptiste Queru
3c5191c61a Merge "Update build rule for executable with PRIVATE_ALL_WHOLE_STATIC_LIBRARIES" 2012-05-21 07:30:17 -07:00
Andrew Hsieh
b968c85edf Set generic_x86/BoardConfig.mk TARGET_ARCH_VARIANT to x86
Change TARGET_ARCH_VARIANT from x86-atom to x86, for the reason
that atom-specific instruciton like "movbe" isn't "generic" to
x86 Android devices and x86 host running emulator-x86, which may
crash non-atom host in VT because "movbe" isn't supported natively.

Also revert previous fix in TARGET_linux-x86.mk which conservatively
disable "movbe" across the board

Change-Id: Ief93a3585566ffae558fcdc29741e6213a048d7d
2012-05-21 14:27:59 +08:00
Andrew Hsieh
112a674798 Add -mno-movbe to disable "movbe" instruction from code-gen
Intruction "movbe" (move data after swapping bytes) is only available in
Intel atom.  Disable it for more general x86 devices and x86 hosts which
run emulator-x86.  Although emulator-x86 can support "movbe", most of
the time we want to run emulator-x86 with VT support for speed (with KVM
in Linux, or HAXM in Windows/MacOSX).  The presence of "movbe" can crash
emulator-x86 in VT because non-atom host doesn't have it natively.

Change-Id: I86e037900ddcb8d544f92b8d8464c8627347e560
2012-05-18 15:53:35 +08:00
Jean-Baptiste Queru
feec98b139 resolved conflicts for merge of 62855a83 to jb-dev-plus-aosp
Change-Id: Ic424ff756396463b98d137f8353d4a230e806a07
2012-05-16 13:18:39 -07:00
Jean-Baptiste Queru
2436ea8a8c Merge "Use i686-linux-android-4.6 for x86 build" 2012-05-16 06:42:55 -07:00
Nick Kralevich
ee08fe3196 stop using a custom linker script for static executables.
This is causing problems with making the linker relocatable.

Change-Id: I53e37fba52eabd3145130712d6e9bff074aed493
2012-05-15 10:40:35 -07:00
H.J. Lu
402d7f3654 Use i686-linux-android-4.6 for x86 build
Change-Id: Ibbb0a899f147013503d6830bb93050c5ae588539
Author: "H.J. Lu" <hongjiu.lu@intel.com>
2012-05-14 08:22:27 -07:00
Nick Kralevich
9d602a7005 am ecb1a565: x86: compile everything with relro / bind_now
* commit 'ecb1a565849b40ab7aa45b7fe71e24e29a059376':
  x86: compile everything with relro / bind_now
2012-05-10 09:24:10 -07:00
Nick Kralevich
ecb1a56584 x86: compile everything with relro / bind_now
Enable relro / bind_now when compiling Android applications.
This marks certain regions of memory as read-only after linking,
making memory corruption security vulnerabilities are harder
to exploit.

See:
 * http://www.akkadia.org/drepper/nonselsec.pdf (section 6)
 * http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html

relro support has been enabled for ARM since 233d460f21.
This change enables it for x86.

Change-Id: Ib90704f2fecffcfdc3587607112804faa0e16385
2012-05-09 14:49:04 -07:00
Kito Cheng
61c37e7a4f Update build rule for executable with PRIVATE_ALL_WHOLE_STATIC_LIBRARIES
Change-Id: I9ff53f51dcb57511a24765bdf6a61c000a7ce977

Signed-off-by: Kito Cheng <kito@0xlab.org>
2012-05-09 23:54:45 +08:00
Jean-Baptiste Queru
269a40d140 am b031afab: am bf3d3287: Merge "Use the same compilation flags on OS X 10.8 as 10.7"
* commit 'b031afab543d8bf9bb236ff4c297f5ced70f8943':
  Use the same compilation flags on OS X 10.8 as 10.7
2012-05-07 13:59:56 -07:00
Al Sutton
35bb6422bc Use the same compilation flags on OS X 10.8 as 10.7
Added Mountain Lion to the list of versions which don't need ranlib
and don't need the pre-Lion linker flags

Change-Id: I0c785f0c66e324af9a209520c5a5b3c9bf7df0d5
Signed-off-by: Al Sutton <al@funkyandroid.com>
2012-05-07 09:44:28 +01:00
Jean-Baptiste Queru
76cc34ca0a am 6dfbf024: am 9e4e3b37: Merge "TARGET_linux-arm.mk: use single slash version of -print-whatever"
* commit '6dfbf0240b77acaf7d6b650b4c206deb29337e7b':
  TARGET_linux-arm.mk: use single slash version of -print-whatever
2012-05-02 17:05:04 -07:00
Jean-Baptiste Queru
9bdc290792 am 8571ee47: am f562adc8: Merge "Force use of compatibility compilers on Apple\'s command line tools"
* commit '8571ee478ee352827ec37460d23e6e0dbb1e96db':
  Force use of compatibility compilers on Apple's command line tools
2012-05-02 14:18:28 -07:00