Commit graph

94 commits

Author SHA1 Message Date
Bruce Beare
e397dcccbb x86: Enable -fstack-protector
Change-Id: I1fe10159b7a29452ecfc6ba328164948cf9950d6
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-05-26 08:53:04 -07:00
Mark D Horn
5812d7b469 Clean up of X86 build flags
Review and clean-up of both compiler and linker flags
to ensure proper usage and consistency for images, toolchain,
SDK, and NDK.

Change-Id: Ife75c32cd49b32345712dee28fa5f2283069a90e
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Author: Bruce Beare <bruce.j.beare@intel.com>
2011-05-18 14:10:58 -07:00
Bruce Beare
6ddd4ead92 x86: Disable stack-protector until bionic is fixed
Change-Id: I2862de5c1b02490197704f4578a8a91d0565eef0
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-04-01 09:09:18 -07:00
Bruce Beare
2e8283d9bc x86: the -mbionic flag is needed for IA builds.
Change-Id: I00c75f37d7ea46b9f8ad3d7b2ff7094477ff0916
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-03-15 07:47:49 -07:00
David 'Digit' Turner
55aad08663 Allow win_sdk build with USE_CCACHE=1
This patch allows the Window sdk build (lunch sdk-eng; make win_sdk)
to work properly when USE_CCACHE is defined in the environment.

There is no Windows ccache prebuilt, but since we're cross-compiling
from Linux, detect it and use the linux prebuilt binary instead.

Note: Depends on https://review.source.android.com//#change,21755
      for a complete solution to the problem.

Change-Id: I0b1b59efae86ee7114225258c9ecf9f257913347
2011-03-15 01:01:32 +01:00
Bruce Beare
a17b91faa4 x86: Use GCC 4.4.3
Change-Id: I083c1afcbb98cfeb48d7bcb7681e5c34db52e767
Author:    H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-03-01 13:04:24 -08:00
Jeff Brown
bd528a82a2 Build system tweaks for Valgrind.
Added LOCAL_NO_CRT to enable building executables that do not link
to the C runtime library.

Removed support for LOCAL_MODULE_SUBDIR since it was broken
and unused.  (Was going to use it but ended up using LOCAL_MODULE_PATH
instead.)

Change-Id: Ifed4ffe17003d90370c711ea6606e2b75e841dee
2011-02-16 15:06:30 -08:00
David 'Digit' Turner
60a1e88052 Add support for custom Linux host toolchains when building the SDK.
This is needed in order to build Linux SDK binaries that can run
properly on Ubuntu 8.04 (Hardy). By default, the host toolchain
on 10.04 (Lucid) generates machine code that won't run on Hardy
due to GLibc ABI mistmatches.

Note that nothing happens if the new toolchain is not in the
prebuilt tree.

Change-Id: I914f5a303f16b6871759ce5a7178585ed3060870
2011-01-16 19:14:04 +01:00
Jean-Baptiste Queru
6c7b6fb3d2 resolved conflicts for merge of b2028868 to gingerbread-plus-aosp
Change-Id: Ibe616c0bdf8e36aaee42279292a2dbe03c5643c2
2010-11-19 12:35:33 -08:00
Bruce Beare
ccec9c45d9 IA: enable SSE fpmath, Separate ARCH_VARIANT and ARCH makefile settings
Change-Id: I60b8121c92b39a60b513bc2496a1e0a21015c586
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2010-11-19 11:15:40 -08:00
Jean-Baptiste Queru
766a2a2125 am 48ec6d6f: Merge "Enables x86-atom as a valid TARGET_ARCH_VARIANT for the simulator build."
* commit '48ec6d6f814a70068c4632b468cd7872f34295ad':
  Enables x86-atom as a valid TARGET_ARCH_VARIANT for the simulator build.
2010-11-17 15:27:13 -08:00
Johnnie Birch
a4716b2618 Enables x86-atom as a valid TARGET_ARCH_VARIANT for the simulator build.
Change-Id: Idbceb6c7d4117fbecd35e4261330e6405666189e
2010-11-17 15:15:08 -08:00
Ying Wang
3b008f3695 am 83f69eb5: Prepend ccache to CC/CXX if necessary.
Merge commit '83f69eb5f905d47581bed141b7f5103362390339' into gingerbread-plus-aosp

* commit '83f69eb5f905d47581bed141b7f5103362390339':
  Prepend ccache to CC/CXX if necessary.
2010-10-07 13:57:29 -07:00
Ying Wang
83f69eb5f9 Prepend ccache to CC/CXX if necessary.
In case TARGET_CC is assigned with HOST_CC (eg, simulator build),
ccache will be prepended twice before this CL.
Bug: 3069576

Change-Id: I2ee44faea3a2795cf389ad6f80e4066a02b43be9
2010-10-07 10:45:02 -07:00
Jean-Baptiste Queru
93847f5355 am cc84526b: Merge "Add atom optimization flags"
Merge commit 'cc84526bcef5ffd7ed9abf73dc3bfc9e29784b22' into gingerbread-plus-aosp

* commit 'cc84526bcef5ffd7ed9abf73dc3bfc9e29784b22':
  Add atom optimization flags
2010-09-10 13:03:13 -07:00
Jean-Baptiste Queru
cc84526bce Merge "Add atom optimization flags" 2010-09-09 14:07:21 -07:00
Ying Wang
2e1347c6a0 am fb644881: Disable new longjmp in glibc 2.11 and later.
Merge commit 'fb644881b6083aa0d9d15e7aad8bfa5a429b1c37' into gingerbread-plus-aosp

* commit 'fb644881b6083aa0d9d15e7aad8bfa5a429b1c37':
  Disable new longjmp in glibc 2.11 and later.
2010-09-02 09:45:11 -07:00
Ying Wang
163fa35fe3 Disable new longjmp in glibc 2.11 and later.
Bug: 2967937
Change-Id: I7a5ef082502192f41c26a48632edfe775dea7648
2010-09-01 16:56:25 -07:00
Ying Wang
fb644881b6 Disable new longjmp in glibc 2.11 and later.
Bug: 2967937
Change-Id: I4e2a5f806ad45a01ca7f8c4d032cd29fce1d794d
2010-09-01 16:39:11 -07:00
Ying Wang
9a8732fb6c Link against Mac OSX 10.5 SDK if building on 10.6.
So that tools built on Snow Leopard (10.6) can be used on Leopard (10.5).

Change-Id: I99745ecbe2ad11feaae31d5be31c34c2e0ad7cc5
2010-08-30 11:52:50 -07:00
Ying Wang
f3a142b8d5 am 7eaa4dc2: Merge "Link against Mac OSX 10.5 SDK if building on 10.6." into gingerbread
Merge commit '7eaa4dc2fbc3d7b3d8a0a2576a6fc14507e176a8' into gingerbread-plus-aosp

* commit '7eaa4dc2fbc3d7b3d8a0a2576a6fc14507e176a8':
  Link against Mac OSX 10.5 SDK if building on 10.6.
2010-08-25 10:10:13 -07:00
Ying Wang
d6683f08c9 Link against Mac OSX 10.5 SDK if building on 10.6.
So that tools built on Snow Leopard (10.6) can be used on Leopard (10.5).

Change-Id: I99745ecbe2ad11feaae31d5be31c34c2e0ad7cc5
2010-08-24 18:34:44 -07:00
Chih-Wei Huang
2467fe24f0 Add atom optimization flags
To enable the optimization, set TARGET_ARCH_VARIANT := x86-atom.

Change-Id: I6b7798944bb8262bd83a76712419d8a77d3c34e9
2010-07-26 10:41:38 +08:00
Ying Wang
4a1addef83 am 90b1d3dc: am b6a1c180: Keep the crt start/end var name of sh consistent with other archs
Merge commit '90b1d3dcfece8eef53277cbcf0326deda9f16f09' into gingerbread-plus-aosp

* commit '90b1d3dcfece8eef53277cbcf0326deda9f16f09':
  Keep the crt start/end var name of sh consistent with other archs
2010-07-13 17:48:40 -07:00
Ying Wang
90b1d3dcfe am b6a1c180: Keep the crt start/end var name of sh consistent with other archs
Merge commit 'b6a1c1802961f40fe4736e80402f849968cd2563' into gingerbread

* commit 'b6a1c1802961f40fe4736e80402f849968cd2563':
  Keep the crt start/end var name of sh consistent with other archs
2010-07-13 17:46:29 -07:00
Ying Wang
b6a1c18029 Keep the crt start/end var name of sh consistent with other archs
So that the PRIVATE_ vars get values correctly.

Change-Id: I1eea67f02c5bab5018b3b5fd93904e1ee8643bf7
2010-07-13 17:41:14 -07:00
Ying Wang
90cf34c72e am f0f60cdd: resolved conflicts for merge of 1a08100f to gingerbread
Merge commit 'f0f60cdd8f4f74b2480774887606afdebec8d891' into gingerbread-plus-aosp

* commit 'f0f60cdd8f4f74b2480774887606afdebec8d891':
  Support to build native libraries with prebuilt NDK
2010-07-13 17:24:09 -07:00
Ying Wang
f0f60cdd8f resolved conflicts for merge of 1a08100f to gingerbread
Change-Id: I9e4183a1d5c0efb13de8655b9eb7c74d50b34cd7
2010-07-13 17:21:33 -07:00
Ying Wang
1a08100fa9 Support to build native libraries with prebuilt NDK
Bug: http://b/issue?id=2811253
Change-Id: Iabd4ab8b3d7236dffe89f1939e1142e882944026
2010-07-13 16:29:18 -07:00
The Android Open Source Project
87f500004a merge from open-source master
Change-Id: I0221f3903a2fc6a0fb25ae62913fdc2e9d3c3f4f
2010-07-12 14:55:52 -07:00
Bruce Beare
fe2ef85d5d Define __ANDROID__ for x86 to be on par with ARM build requirements
Change-Id: I79c8f29af1f20b694f22a39f848216022809a5c6
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-12 13:47:41 -07:00
The Android Open Source Project
0fd96df49c merge from open-source master
Change-Id: I40aa6f0f885ea30dd5f9918c323fa240a4830c38
2010-07-09 16:02:03 -07:00
Bruce Beare
45ac434151 Refactor Stripper. Allow a stripper other than SOSLIM to be specified
Change-Id: I61137f5bb123dc5f610af9928ed3debdf85ba74d
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-09 12:16:46 -07:00
David 'Digit' Turner
438f5f75ec Enable shared libraries to use crtbegin_so.S and crtend_so.S
This is necessary to ensure that dlclose() will properly call C++
destructors for the static objects within the shared library.

Change-Id: Ieb056042f9cda7ab120eb770b21f365cd6d64a66
2010-06-18 16:08:36 -07:00
Jing Yu
ada132a80b Switch toolchain from gcc-4.4.0 to gcc-4.4.3
gcc-4.4.3 toolchain is based on fsf GCC-4.4.3 with numerous patches.
It reduces 3.65% code size than the prebuilt gcc-4.4.0 toolchain,
and improves 3.4% performance on Android benchmarks.

The toolchain uses gold as default linker. With gold, the toolchain
further reduces 1MB system image.

Change-Id: I55eb4df185f2932e71498fcc28428e4d1b175393
2010-06-16 20:17:19 -07:00
David 'Digit' Turner
3e4677856f Remove irritating warnings about 'va_list' mangling when building C++ sources.
Change-Id: I6305e93515e57462e7c57af0cc41a659e4190696
2010-06-16 16:04:55 -07:00
The Android Open Source Project
4873d8f5ca merge from open-source master
Change-Id: Id3161ac44e0eaba0184b3d2d4af43e4e40d26e90
2010-06-04 07:56:24 -07:00
Jeff Hamilton
8d09b69e2d Build host tools as 32bit on all Darwin machines.
Change-Id: I121b388056e68b787518c66a01c172bc4ffaef9b
2010-06-03 17:59:11 -05:00
Jeff Hamilton
ebc2869b8d Build host tools as 32bit on all Darwin machines.
Change-Id: I121b388056e68b787518c66a01c172bc4ffaef9b
2010-06-03 12:29:19 -05:00
Nick Kralevich
d868cad828 Add -Werror=format-security
Security hardening: don't allow code to compile which
uses format strings in an inappropriate way.  Make format
string compiler warnings into errors.

Change-Id: I1461dad589a2416420fd84ccf765983e859eea8a
2010-05-17 14:30:01 -07:00
Nick Kralevich
2915cc3e32 Enable NX protections
Add -Wa,--noexecstack and -Wl,-z,noexecstack as default
flags when compiling applications.  This enables NX
protections, which prevent code from executing on the
stack or heap.  NX protections can block a large number
of buffer overflow attacks, and is an important security
feature.

Change-Id: Iad4bab9f8664584ba6ce832a5318d07680d7a908
2010-05-05 11:09:52 -07:00
Nick Kralevich
387e4d0601 LOCAL_LDFLAGS should come after TARGET_GLOBAL_LDFLAGS
A package can define a LOCAL_LDFLAGS.  If a LOCAL_LDFLAGS
exists, it should come after the global LDFLAGS, to allow
the local flags to override the global flags.

Change-Id: I6e44c17949c1f11c808d0ed3f327d63fb51a1468
2010-04-26 14:12:19 -07:00
Colin Cross
f807c55f39 Add a new build target armv7-a-neon
Change-Id: Ib3b44e839b093974aff0d595950e6b691beee7a5
2010-03-10 16:07:14 -08:00
Colin Cross
5720bb91a4 Modify the armv7-a target arch to not use NEON
To build for a target with NEON, use armv7-a-neon

Change-Id: I70d509287b04c0faebe44faf6c8ebb28a7360ff9
2010-03-10 16:06:44 -08:00
Andy McFadden
99e087bc82 Added -lpthread to target LDFLAGS for sim-eng.
This adds "-lpthread" to TARGET_GLOBAL_LDFLAGS when TARGET_SIMULATOR
is true.  This is much easier than inserting it into individual
makefiles as needed.  Has no effect on other builds.

Should fix the sim-eng build breakage in libcameraservice.

Change-Id: I4dcd7d54b93d1be1622b8ce78a1662d28ca9f9f2
2010-03-08 12:42:46 -08:00
Andy McFadden
ef26218762 Tweak default x86 target arch variant.
Simply set the arch variant for sim-eng to be "x86".
2010-02-26 13:50:44 -08:00
Andy McFadden
16e95bb99d Build the target side of the simulator as 32-bit.
This detail got lost in my previous cleanup change 9b4a812.

Also add a comment explaining why the host side of the
simulator needs to be built in 64-bit (wxWidgets).

Change-Id: I2a867f7f80b43d53e73348b19f6ae834600295f9
2010-02-24 08:33:08 -08:00
Jean-Baptiste Queru
9b4a81237b Get rid of $(combo_target)
The only OS-ARCH combo that would have benefited from it
is linux-x86, but it explicitly used separate configurations
for the HOST_ and TARGET_ side of things.

This makes is clear which files are related to the HOST_
configuration and which ones are related to the TARGET_
configuration, and expands $(combo_target) to the only
possible/reasonable value that it could have had in every
file.

This also cleans up the simulator, by moving it in a single
place in TARGET_linux_x86 (since the only part that's special
is to use HOST_ settings even when building TARGET_ modules).

Change-Id: I2420eeb8cfe539f5807ec99cb3177ffb9f2476d5
2010-02-23 12:36:56 -08:00
Andy McFadden
e009f29590 Fix build.
The "set default variant to armv5te if none defined" in the ARM config
was applying to all architectures, but as it turns out only ARM builds
actually cared.  When I made a copy of the "set default" code to the x86
config, one or the other would win for builds that didn't specify a
variant.  Turns out x86 won, so sim and voles worked, but opal didn't.
2010-02-23 10:24:33 -08:00
Andy McFadden
8d7c2b5c6d Provide default variant for x86.
The TARGET_ARCH_VARIANT was not being set for x86.  This caused some
difficulties when x86-atom tried to include variant-specific versions
of files.
2010-02-22 12:44:04 -08:00