Commit Graph

233 Commits

Author SHA1 Message Date
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
Jean-Baptiste Queru 9e4e3b378f Merge "TARGET_linux-arm.mk: use single slash version of -print-whatever" 2012-05-02 13:26:50 -07:00
Al Sutton 0d07c732c7 Force use of compatibility compilers on Apple's command line tools
The cc and c++ compilers included in Apple's command line tools show some
unusual behaviour which causes the build to fail in several projects under
Xcode 4.3

This patch uses the gnu compatibility gcc and g++ compilers on OS X instead
to reduce problems, and generates an error when an llvm based compiler is
detected because they currently do not generate usable emulator executables
due to them not honouring global register variables.

Change-Id: I506c22dad3dcbd41df3c7672802a675d3655e262
Signed-off-by: Al Sutton <al@funkyandroid.com>
2012-05-02 07:11:27 -07:00
Nick Kralevich 233d460f21 ARM: 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

Stop using the custom linker script, which inhibits
relro / bind_now support.

Change-Id: Ie97ccdd2845886bbc2ba2fdd47eed0ff4b29b60b
2012-04-26 09:09:24 -07:00
Jean-Baptiste Queru 4e82d1fa7f On linux, always use the prebuilt host toolchain
Change-Id: I8077c4780e1e3540e5e2133cf0ffa61d474d3acc
2012-04-20 19:04:56 -07:00
Jean-Baptiste Queru a50ef1c124 Switch to new locations of toolchains
Change-Id: I15a8be11b3d0f1985ffd97dd51a1af18e1ce7b67
2012-04-20 16:15:42 -07:00
Jing Yu c856e31523 Workaround for a gcc-4.6 bug on -fstrict-volatile-bitfields.
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html
http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01390.html

-fstrict-volatile-bitfields is set on by default on gcc-4.6
for ARM target. This causes an inline asm() error. While
upstream gcc community is working on the patch, we shut
off this option temporarily.

This patch does not affect gcc-4.4.3 build.

Change-Id: Id7016dc5856a516e10f2617232945034728a74ab
2012-04-20 07:53:16 -07:00
Doug Kwan 422a3650d3 Fix build problems with gcc-4.6.x.
Change-Id: If02f18efde4cec39c97bb0e7226b008cd6b85dd4
2012-04-20 07:52:47 -07:00
Nick Kralevich b3789be766 Revert "ARM: compile everything with relro / bind_now."
This reverts commit 020e4919e8.
2012-04-10 13:13:29 -07:00
Nick Kralevich 020e4919e8 ARM: 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

Stop using the custom linker script, which inhibits
relro / bind_now support.

Change-Id: Iaebfbbb492299004f9da92b649985b6cd67d8c97
2012-04-09 12:04:32 -07:00
Jing Yu f5172c7564 Switch default gcc toolchain from 4.4.3 to 4.6.
Switch both arm-linux-androideabi toolchainand arm-eabi toolchain.

Change-Id: I7b2771fe684853ab37e3b5b7cfe4146f9f901e02
2012-03-29 20:45:50 -07:00
Andrew Hsieh 2245d17dc8 Point to new linux prebuilt toolchain for SDK build
Change-Id: I21849119b0f3f45f950e9e6d1da0833aff381fb7
2012-03-22 09:55:36 -07:00