Commit graph

6492 commits

Author SHA1 Message Date
Elliott Hughes
ba2f676410 Remove HAVE_WIN32_IPC.
Change-Id: I6c01ed5b059c230d7382dc6158103f31d4bf9dbb
2015-07-09 10:20:13 -07:00
Elliott Hughes
60dda9c44d Merge "Remove mkbootimg from the pathmap." 2015-07-08 23:13:32 +00:00
Elliott Hughes
fd5692b32c Merge "Stop polluting the namespace with HAVE_MALLOC_H in AndroidConfig.h." 2015-07-08 23:11:18 +00:00
Elliott Hughes
3d949bbabc Remove mkbootimg from the pathmap.
It's only ever referred to directly. (Should probably move to
system/core/include, but that's orthogonal to this change.)

Change-Id: I353afff031a29206aaa5a0991fe0ccb39e4731e2
2015-07-08 16:05:17 -07:00
Elliott Hughes
b248bf85ae Remove pathmap.mk entries for libc.
Change-Id: I9f4ce70696dd7df5922b3c80501fac9c7d4b7149
2015-07-08 14:10:23 -07:00
Elliott Hughes
5dbf4eab72 Stop polluting the namespace with HAVE_MALLOC_H in AndroidConfig.h.
Change-Id: If1cd88ee14bf9cbb4a0a1f608b0d015c9181c2c2
2015-07-08 13:12:38 -07:00
Ying Wang
491fca9809 Simplify LOCAL_NO_CRT.
Change-Id: If2486e4861071df6b225fe7f387530a38f554484
2015-07-02 15:58:34 -07:00
Elliott Hughes
cd26a2dd7e Merge "Remove HAVE_STDINT_H namespace pollution." 2015-07-02 18:50:26 +00:00
Ying Wang
75011b2003 Add LOCAL_NO_LIBGCC.
This can be used to compile independent libraries without the need for
libgcc.a.

Change-Id: I924200995569d9a978ddbaa6ec321d80734f1374
2015-07-02 11:05:27 -07:00
Elliott Hughes
d47e01a3a1 Remove HAVE_STDINT_H namespace pollution.
Change-Id: I1e42d1616da0f3a90f8da189d2e919f781c4eb5a
2015-07-02 10:26:53 -07:00
Ying Wang
bbaeaa5879 Merge "Configure synci generation explicitly" 2015-07-01 18:58:52 +00:00
Evgenii Stepanov
473dfdf71b Merge "Move sanitized vendor libraries to /data/vendor/lib(|64)." 2015-06-30 21:30:29 +00:00
Evgenii Stepanov
bf140974b2 Move sanitized vendor libraries to /data/vendor/lib(|64).
Sanitized RPATH now mentions /system/vendor/lib to preserve overlay
in the case when a sanitized version of a vendor library can not be
built.

Bug: 22199458
Change-Id: I3222d2e1d6c08fdd1e0404fcb7db347aa4a92bb7
2015-06-30 14:04:45 -07:00
Tao Bao
4e66343b2b Retry adjusting the size computation for reserved blocks.
Due to the change in https://lwn.net/Articles/546473/, kernel reserves a
few extra blocks (lesser of 2% and 4096 blocks) on ext4 FS which leads to
OTA update failures. Adjust the size computation if the device has
BOARD_HAS_EXT4_RESERVED_BLOCKS := true.

It amends the last attemp in [1]. Now it computes the used blocks from the
make_ext4fs output, instead of altering its argument.

[1]: commit efbb5d2e69.

Bug: 21522719
Bug: 22023465
Bug: 22174684
Change-Id: Iaae6507f6de68a5892f2e3035d330039287b4492
(cherry picked from commit c7a6f1e4f8)
2015-06-30 12:17:28 -07:00
Evgenii Stepanov
5adfcb166e SANITIZE_TARGET: allow undef symbols in non-sanitized shared libraries.
These symbols are defined in the ASan runtime library, which is always
present at runtime.

Bug:21785137

Change-Id: Ib8418c66323fd4cdfdc05548048f32380cb84ee5
2015-06-25 17:34:44 -07:00
Ying Wang
8f180b904f Merge "Create userdata.img with real data when SANITIZE_TARGET=address." 2015-06-25 21:29:52 +00:00
Ying Wang
2a04839aec Create userdata.img with real data when SANITIZE_TARGET=address.
Bug: 21785137
Change-Id: Ie0c36988759fe07419ad29bab5a71cdd0d992d2a
2015-06-25 14:29:04 -07:00
Mohamad Ayyash
19cfe7db4c Merge "Add img2simg in host and ota packages" 2015-06-25 18:44:03 +00:00
Mohamad Ayyash
9764892031 Add img2simg in host and ota packages
Change-Id: Ide660cf3cf69c74bbd15d0ac6642b60d58f076fa
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-06-24 16:08:15 -07:00
Ying Wang
e6e544e596 Don't include static executables when SANITIZE_TARGET=address
Also we can't build the ota package without these static executables.

Bug: 21785137
Change-Id: I11b35abebced4b0608378a072ece2ab2dbadeffb
2015-06-23 10:46:03 -07:00
Claes Elgemark
cd5bee3546 Add variable ANDROID_NO_TEST_CHECK to not build all test modules
Introduce a way to speed up local builds. Don't build all test
modules if ANDROID_NO_TEST_CHECK is set to true.

On master branch this reduces what is built by more than
300 apps and 50 java libraries. Time for doing this on a
12 core machine running with -j13 is about 10 minutes.

Change-Id: I90feb108695ee60d0dbbf497644f767cc3748215
2015-06-23 15:49:54 +02:00
Evgenii Stepanov
a36223e7e0 Clean intermediate files if SANITIZE_TARGET has changed.
Do not clean installed files, only intermediate files. This way, two
consequitive builds first without, then with SANITIZE_TARGET will
produce a frankenbuild with both sets of shared libraries.

Bug: 21785137
Change-Id: I231868b15331be942c783458cf36233c2e7740d3
2015-06-19 11:15:50 -07:00
Evgenii Stepanov
4d3d4141ae With SANITIZE_TARGET, move shared libraries to /data.
A fully (or even mostly) asan-instrumented device will have 2 copies of each
shared library, which might not fit on system partition. Moving instrumented
libraries to /data.

Bug: 21785137
Change-Id: I64184261da2eb24a1382c67e4931c34a5a38b3c0
2015-06-19 11:15:50 -07:00
Evgenii Stepanov
d479a7a119 Merge "Enable SANITIZE_TARGET." 2015-06-19 18:15:08 +00:00
Dan Albert
abf4bc916a Add support for LOCAL_SANITIZE := integer.
This also does a bit of cleanup in config_sanitizers.mk. The result is
that `LOCAL_SANITIZE := <any arbitrary ubsan group>` should function
fine for both host and target.

This is a superset of LOCAL_DETECT_INTEGER_OVERFLOWS, so remove that.
This also checks integer division by zero.  It's supposed to cover
shifting undefined behaviors as well, but apparently it does not
(though `LOCAL_SANITIZE := shift` works fine).

Change-Id: I4ac99eafa6920a3f8cb82af37ce56ff0fdb95223
2015-06-19 10:28:06 -07:00
Dan Albert
1578c487c9 Cleanup unused clear_vars.mk entry.
Change-Id: Ibd7b87d1364a60289609a267a287c4afa1d5e5cb
2015-06-19 10:24:07 -07:00
Evgenii Stepanov
3632cc3241 Enable SANITIZE_TARGET.
The same as SANITIZE_HOST, but for the target.
Also, skip all LOCAL_FORCE_STATIC_EXECUTABLE targets, as ASan does not
support static linking.

Bug: 21785137
Change-Id: Ief53ff8de1fee18f230d6c7dd31845db5bbd415c
2015-06-18 18:24:40 -07:00
Dan Albert
06f0a137dc Merge "Remove LOCAL_ADDRESS_SANITIZER." 2015-06-17 17:21:27 +00:00
Nikola Veljkovic
91091280f1 Revert "[MIPS] Do not use compact branches until GDB supports them"
This reverts commit 063ef33089.
2015-06-17 17:22:26 +02:00
Dan Albert
b32c0009a3 Remove LOCAL_ADDRESS_SANITIZER.
I've migrated all users of this to the new option now, so we can drop
this.

Dropping `SANITIZE_HOST := true` will have to wait until the build
server configs have been updated.

Change-Id: I591436e197a6c6c079a6cd6a2decb702b574cd71
2015-06-16 22:20:19 -07:00
Elliott Hughes
c09eaa7a44 Remove copy & paste cruft from the mips64 combo.
libthread_db hasn't been in bionic for years.

Change-Id: Ibc036d894c6b6bf9ee4653f95ff7a000a223cb2e
2015-06-16 15:22:52 -07:00
Dan Albert
c27d471742 Merge "Fix libdl inclusion for default-ub." 2015-06-16 21:13:44 +00:00
Nick Kralevich
99d92506ac Add support for LOCAL_DETECT_INTEGER_OVERFLOWS
Add build system support for LOCAL_DETECT_INTEGER_OVERFLOWS. When enabled,
an attempt to perform an integer arithmetic operation which overflows
will result in a call to abort(). This is intended for security
sensitive code, where integer overflow operations are not expected
nor desirable.

Two classes of underflows/overflows are detected and blocked:

1) Signed integer underflow/overflow.
2) Unsigned integer underflow/overflows.

Signed integer overflows are undefined behavior, according to the
C standard. Unsigned integer overflows are defined behavior, but
still undesirable in security sensitive code.

Only clang is supported today. gcc has -ftrapv for handling signed
integer overflow, but it's widely considered broken
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35412) and we're
deliberately avoiding it's use here.

Change-Id: Ib4918dc84e37e83d4205e5035544545d91671e5f
Vaguely-Related-Bug: 11859726
2015-06-15 14:52:09 -07:00
Dan Albert
7508a81d40 Fix libdl inclusion for default-ub.
We shouldn't be using ldlibs for target libraries because it doesn't
add a real dependency.

Change-Id: Ib1ec40b95356feb521e95674b64d04d5ecc06332
2015-06-15 11:39:29 -07:00
Dan Albert
d160041149 Force some clang Werrors that *will* break things.
Clang is really aggressive at optimizing a handful of cases (read:
clang will ruin your day some if you write bad code). Fortunately, it
also emits a warning when it's about to do this.

To prevent anyone from suffering from these optimizations, make these
warnings errors and make them impossible to disable.

Change-Id: I5e10bb0fc2ca23190017da716b3b84635577a0bd
2015-06-10 17:24:38 -07:00
Ying Wang
1b96592aab Merge "Add build_verity_metadata.py to dist-tools" 2015-06-09 16:20:49 +00:00
Narayan Kamath
7d2c71cf90 Merge "Remove duplicate CTS tests from libcore cts packages." 2015-06-09 10:03:16 +00:00
Narayan Kamath
6ca9b2b1a3 Remove duplicate CTS tests from libcore cts packages.
The catch all "org" package was catching several thousand
org.apache.harmony.tests.* tests that are already covered by
other packages. Replace the catch-all org.* with specific prefixes.

Needs additional support in CollectAllTests to handle multiple
prefixes. This is implemented in the companion change.

bug: 20862863

(cherry picked from commit cf7fbcd03d)

Change-Id: I1d28f91cfca098ccdcd62e88bb486b433d9c29d8
2015-06-09 10:52:34 +01:00
Mark Salyzyn
911637bf33 Merge "Add missing shared libraries to dist tools" 2015-06-08 23:51:33 +00:00
Ying Wang
8e42131ba2 Merge "Strip path from verity_signer_cmd in the target-files meta data." 2015-06-08 23:40:01 +00:00
Ying Wang
080f57aed7 Merge "Remove the unnecessary full_x86_64 and full_mips64." 2015-06-08 19:01:47 +00:00
Ying Wang
0a76df5ce7 Remove the unnecessary full_x86_64 and full_mips64.
For historical reason, the aosp_* products were named full_*.
We keep the full, full_x86 and full_mips in case some tools still
reference these legacy names; But no reason the have the full_* product
names for the new 64-bit archs.

Change-Id: I240ed0c6ded0ded2d80603bd0c5ff24750999afc
2015-06-08 11:57:26 -07:00
Claes Elgemark
82a19d3662 Add build_verity_metadata.py to dist-tools
Preserve path as it is referenced by build_image.py.

Change-Id: Id6833d243b5a15b4ee5e0013340aeb2cd35f3578
2015-06-05 10:31:53 +02:00
Claes Elgemark
d0ec665727 Add missing shared libraries to dist tools
Add missing libraries used by e2fsck and build_verity_tree.

Change-Id: I8bf0341300863ef0090b395b2aba0b7a952f6b58
2015-06-04 14:31:56 +02:00
Ying Wang
934d9b158e Add selinux and verity support to custom image generation.
New custom image configuration variables:
- CUSTOM_IMAGE_SELINUX, set to "true" if the image supports selinux.
- CUSTOM_IMAGE_SUPPORT_VERITY, set to "true" if the product supports verity.
- CUSTOM_IMAGE_VERITY_BLOCK_DEVICE

Also changed the staging directory name to the mount point, like we do
for other images built by the build system.

Bug: 19609718
Change-Id: I6bbf06b79eee63e4c77834f2e6f1d5a7f7e00a12
(cherry picked from commit 7d51a40295)
2015-06-03 09:56:31 -07:00
Ying Wang
4540a85dd4 Support to configure and build multiple custom images.
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
   PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
   Each makefile configures an image.
   For image configuration makefile foo/bar/xyz.mk, the built image
   file name
   will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
  - CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
    etc.
  - CUSTOM_IMAGE_PARTITION_SIZE
  - CUSTOM_IMAGE_FILE_SYSTEM_TYPE
  - CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
    accepted by BuildImage() in tools/releasetools/build_image.py.
  - CUSTOM_IMAGE_MODULES, a list of module names you want to include
    in the image; Not only the module itself will be installed to proper
    path in the image, you can also piggyback additional files/directories
    with the module's LOCAL_PICKUP_FILES.
  - CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
    the image. <dest> is relativ to the root of the image.

To build all those images, run "make custom_images".

Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
2015-06-03 09:56:29 -07:00
Claes Elgemark
d53cd9b0b1 Add VeritySigner.jar to ota tools
Used by verity_signer

Change-Id: I6e2b654144b40573c3f3c0dc0d1c943889ffcd7d
2015-06-03 16:41:51 +00:00
Claes Elgemark
ec99604b07 Strip path from verity_signer_cmd in the target-files meta data.
Strip path to be able to use outside a build e.g.
when resigning using the dist tools zip.

Change-Id: I492dcfd5791b66c17ae2e751cc8f67127e97b800
2015-06-03 15:09:54 +02:00
Yohann Roussel
b518c3ec0b [DO NOT MERGE] Add support for RMTYPEDEF with Jack
Bug: 21099584

(cherry-picked from commit 5b2c6e26db)

Change-Id: I39aa1f24780c216e978ef743098ca7ac65b2962e
2015-06-02 12:25:51 +02:00
Ying Wang
30127bfdad Add $ORIGIN/lib[64] to host binary's rpath.
Normally the binaries use the exsiting $ORIGIN/../lib[64] with binaries
in the bin subdirectory;
For historical reason the binaries in the SDK package don't have a bin
subdirectory. This workaround enables them to work in the existing SDK
directory structure.

Bug: 21301578
Change-Id: Ibebfbfb8b30e81e7bbaf13a21bb205f3f0282d24
(cherry-pick from commit 4fe7bfd373)
2015-06-01 11:28:02 -07:00