Commit graph

3582 commits

Author SHA1 Message Date
Chris Dearman
1efd9e462a [MIPS64] Add mips64 target
Change-Id: Ice1621101c0d5a3314db288542ca8020e3f406bf
Signed-off-by: Duane Sand <duane.sand@imgtec.com>
2014-02-05 19:07:57 -08:00
Christopher Ferris
afbbce3ff1 Merge "Add library test makefile solutions." 2014-02-06 02:16:35 +00:00
Christopher Ferris
70ca5e5b39 Add library test makefile solutions.
Change-Id: Ibc8df9b0e2342683158936bf011425780df8f02a
2014-02-05 16:36:42 -08:00
Colin Cross
90353fe86f add support for more LOCAL_*_arch variables
Add support for:
LOCAL_SHARED_LIBRARIES_arch
LOCAL_STATIC_LIBRARIES_arch
LOCAL_WHOLE_STATIC_LIBRARIES_arch
LOCAL_GENERATED_SOURCES_arch
LOCAL_REQUIRED_MODULES_arch

Change-Id: Iad91702e140d8dba7dcaee13f236c77b1e626a34
2014-02-04 19:44:57 -08:00
Colin Cross
aee1e779f4 don't rename 32-bit executables to *_32
Renaming 32-bit executables to *_32 breaks PRODUCT_PACKAGES
dependencies.

Change-Id: I53d89991633ef4af03c4e618c463769937a70e38
2014-02-04 19:44:09 -08:00
Colin Cross
ec14ce578b remove 2nd arch from ARCH_ARM_* defines
Users of ARCH_ARM_* defines don't care about first vs. second arch,
set ARCH_ARM_* regardless of which arch is arm.

Change-Id: I2ae83ec5c3f839ff91a0e352c95d76ec2cbd5dc5
2014-02-04 19:44:09 -08:00
Colin Cross
5394bf1950 Fix installing 2nd arch shared libraries
2ND_TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES was not set,
which was causing the later += to act like = instead of
:=, and the dependencies would disappear as soon as
LOCAL_MODULE was cleared.

Change-Id: Idea291524fc06377deafec62f37d20eaa7f93bca
2014-02-04 19:44:09 -08:00
Tim Murray
5352018b0b Merge "Add new rs directory to list of Java subdirs of fw/base." 2014-02-03 22:35:54 +00:00
Ying Wang
3136010cdd Dedup the targets and dependencies of required modules.
For whatever reason, two modules may have the same file as their
installed module. In that case circular dependency is created if the two
modules have requited-by relation.

Change-Id: I15ed271ca3f3c343e4662182ded5ccc63d6c42cc
2014-01-31 19:22:35 -08:00
Tim Murray
f6752d303f Add new rs directory to list of Java subdirs of fw/base.
Change-Id: I3213a314e7700162e781526c0450678495442759
2014-01-31 12:32:42 -08:00
Brian Carlstrom
49f1fab8a5 build: Rename persist.sys.dalvik.vm.lib to allow new default
Bug: 12798969
Change-Id: Ie73a3f2b6655d0ae3e3a905a1c64747343c525a0
2014-01-30 13:16:37 -08:00
Ian Rogers
d206afecb8 Disable WITH_HOST_DALVIK on 64bit host builds.
Change-Id: I8cea32fe5541c3223e7f317245aab3061e8ad444
2014-01-30 08:55:17 -08:00
Ian Rogers
694b2b7b12 Define __STDC_FORMAT_MACROS on Windows host builds.
Change-Id: I89b54a63c3f111b8242fe9e813d94a839c484195
2014-01-29 21:37:37 -08:00
Colin Cross
78d642f426 build: rename LOCAL_32BIT_ONLY to LOCAL_32_BIT_ONLY
Rename for consistency with TARGET_IS_64_BIT.

Change-Id: I824dcaed0c1e88b8246bcffb21ab3f1772175926
2014-01-29 18:35:23 -08:00
Colin Cross
44a752659c build: support LOCAL_*_32 and LOCAL_*_64
Support the following new variables based on whether the current multilib
target is 32 bit or 64 bit:
LOCAL_CFLAGS_32
LOCAL_CFLAGS_64
LOCAL_LDFLAGS_32
LOCAL_LDFLAGS_64
LOCAL_ASFLAGS_32
LOCAL_ASFLAGS_64
LOCAL_C_INCLUDES_32
LOCAL_C_INCLUDES_64

Change-Id: Ia868d56dff114be301bf8297eec768675f186927
2014-01-29 18:35:23 -08:00
Ian Rogers
61e5059ef7 Fix the host inttypes.h problem globally.
Bug: 12708004
Change-Id: I2c75647bac304b82e150c540b9e6c5568997596d
2014-01-29 16:29:11 -08:00
Elliott Hughes
472a48585e Merge "gtest needs -lpthread." 2014-01-29 01:45:17 +00:00
Elliott Hughes
52e52d1447 gtest needs -lpthread.
Host gtests that don't use pthreads themselves need to be linked
against libpthread because gtest itself uses pthreads to ensure
thread-safety. (It can't know in advance whether the code under
test is going to spin up threads, so it has to be pessimistic.)

Change-Id: I14fb1098c163d7fe6ae9a9a0314acead4ec9383d
2014-01-28 17:32:30 -08:00
Elliott Hughes
1a731adf94 Merge "Fix KERNEL_HEADERS_ARCH for mips and x86." 2014-01-28 21:23:07 +00:00
Elliott Hughes
171e940c7a Fix KERNEL_HEADERS_ARCH for mips and x86.
arm and arm64 have distinct headers, but mips and mip64, and x86 and x86_64
use headers that work for both widths. So where arm/arm64 need to handle the
second architecture case specially, all we need to do for the others is
hard-code the name. (x86_64.mk already hard-codes x86; we need to change
x86.mk for the case where we're building the 32-bit binaries for a mixed
system. mips64.mk doesn't exist yet, but when it does, it'll hard-code
just plain "mips" too.)

Change-Id: Ia6b9f77b4eb2c78729b454045875c409e0ea8197
2014-01-28 13:10:19 -08:00
Brian Carlstrom
8fb5dfc5c7 build: PRODUCT_DEX_PREOPT_IMAGE_IN_DATA
(cherry-picked from commit cd337c71ee65b17529a67af34d4c0b2824a4f175)

Change-Id: I6d8ab3b3cf52f6a6b15f1c8e8d00cdf59042436b
2014-01-28 11:29:58 -08:00
Colin Cross
8f47fc379e Add support for TARGET_GLOBAL_UNSUPPORTED_CFLAGS
To ease the transition between toolchains, allow a target to specify
a list of cflags that the toolchain does not support.  These will be
filtered out of the cflags provided by the module.

Add TARGET_GLOBAL_UNSUPPORTED_CFLAGS := -fstack-protector for the
aarch64 toolchain, it does not yet suport -fstack-protector.

Change-Id: I168d0c6f131326fad305ec86fad46e6a3e03295a
2014-01-27 18:21:12 -08:00
Elliott Hughes
2f8dcdd961 Remove libthread_db from the default include path.
This should never have been on the default include path.

The NDK statically links its own libthread_db, so I'm removing
bionic's unused copy from devices.

Bug: 11882807
Change-Id: I49a67fe0902cc4bc178360f6c993959774d74e3a
2014-01-27 15:45:17 -08:00
Colin Cross
1acb1b64b9 Merge changes I62504bad,I16208cca,I4e4ceec6
* changes:
  add new gen/ directory for generated sources
  warn on LOCAL_MODULE_PATH in multiarch shared libraries
  Support LOCAL_MODULE_RELATIVE_PATH
2014-01-27 23:35:01 +00:00
Ying Wang
25a16fe80e Merge "Don't modify LOCAL_MODULE_TAGS." 2014-01-27 23:20:06 +00:00
Ying Wang
37bd1f2d83 Don't modify LOCAL_MODULE_TAGS.
Change-Id: Id70d48c1d7abf02139925bcb3208515ea1a082b9
2014-01-27 15:19:09 -08:00
Colin Cross
d826264621 add new gen/ directory for generated sources
Allow modules to generate source into $OUT/gen, which will then
be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as
necessary.  This allows a single build rule invocation that includes
generated source to build for the first and second architectures.

Modules will need to change calls to local-intermediates-dir into
local-generated-sources-dir.

Change-Id: I62504bad9454b3d9fde7b84ab9f0a487a2ecf0bf
2014-01-27 14:45:44 -08:00
Colin Cross
d0378b3f2d warn on LOCAL_MODULE_PATH in multiarch shared libraries
Using LOCAL_MODULE_PATH in a shared library module while building a
multiarch target will cause build rules for both architectures to install
into the same path.  Warn and suggest LOCAL_MODULE_RELATIVE_PATH.

Change-Id: I16208ccada6d43a26a342af35096f49d8df26e81
2014-01-27 14:43:24 -08:00
Colin Cross
639c336dc1 Support LOCAL_MODULE_RELATIVE_PATH
Most users of LOCAL_MODULE_PATH are setting a subdirectory of the
normal install path, for example to install HALs into system/lib/hw.
This is problematic for multiarch builds, where the install location
depends on the arch.  Allow modules to specify LOCAL_MODULE_RELATIVE_PATH.
HALs will generally use:
LOCAL_MODULE_RELATIVE_PATH := hw

Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
2014-01-27 14:43:14 -08:00
Andrew Boie
f3ec9ed045 collect_gpl_sources.mk: Declare rule to assemble GPL sources FORCE
We have no rigorous way to detect whether the code referenced for this
mechanism changes in between builds. So declare this as a phony target
so that it is rebuilt every time.

Change-Id: Ie1670d96895719d406e7b0defd53ba3cd224dd83
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-01-27 12:25:43 -08:00
Ying Wang
dbdafdb865 Support arch-specific LOCAL_C_INCLUDES.
Bug: 11654773
Change-Id: I89c7ce7ff8bea15cb81f9cd9b0188b54beed3422
2014-01-27 10:27:19 -08:00
Colin Cross
d9574462d8 Add 2nd arch directories for apps
Apps built for 2nd arch install in the same directories as when
built for the 1st arch.

Change-Id: Ib1d950e186eef88212b44d04e6bc6c30a3d56155
2014-01-24 16:44:06 -08:00
Colin Cross
0b70c4374c Set up rules to build prebuilts for TARGET_2ND_ARCH
Prebuilts built for the 2nd arch will install into 2nd arch
directories.

Change-Id: I3d020a3c1fb0f2eb0579933f8a66e410e66fdd44
2014-01-24 16:44:02 -08:00
Colin Cross
2343cfbe3d Set up rules to build packages for TARGET_2ND_ARCH
Packages built for the 2nd arch will depend on jni libraries
build for the 2nd arch.

Change-Id: Ic9594718849b2577920c500c35d46150eb948c8d
2014-01-24 16:04:19 -08:00
Colin Cross
b34911cadf build: print module that has unhandled install path
Print the name of the module that is providing an unhandled install
path.

Change-Id: I0e8b02f01de1dde715f0985034ad943f793218ba

Conflicts:
	core/base_rules.mk
2014-01-24 13:44:11 -08:00
Colin Cross
6e087a339b build: use correct arm vs thumb arguments for 2nd arch builds
Set arm_objects_mode and normal_objects_mode when building a
module for arm when it is the 2nd arch.

Change-Id: I5f7df519b6e1dde6cbf92d106681f07a58e1f1f2
2014-01-24 13:42:01 -08:00
Colin Cross
c3256c770d build: use arm kernel headers for arm 2nd arch builds
Compiling for arm requires using the arm kernel headers and not
the aarch64 kernel headers.  Add $(combo_2nd_arch_prefix) to get
asm-$(TARGET_2ND_ARCH) when arm is the 2nd arch.

Change-Id: I15270d0ef35e48c034bf4d0d5e35b76f67b2a8e1
2014-01-24 13:41:00 -08:00
Ying Wang
b8e0185489 Support arch-specific LOCAL_ variables
With those variables, you can set up different values for TARGET_ARCH
and TARGET_2ND_ARCH.
Also fixed a couple of variables.

Bug: 11654773
Change-Id: I4c7684a562cd5877d18f67d4f848b8df07d0103b

Conflicts:
	core/base_rules.mk
2014-01-24 13:38:34 -08:00
Ying Wang
5c7fed28f2 Make sure to install the .odex when running "make <module_name>"
Change-Id: I64195294dad15b7d379d667f4c4738c2808fd384
2014-01-24 13:37:11 -08:00
Ying Wang
dd814bf8c2 Support to build executables for TARGET_2ND_ARCH
By default, an executable is built for TARGET_ARCH.
To build it for TARGET_2ND_ARCH in a 64bit product, use:
LOCAL_32BIT_ONLY := true
To skip a module for TARGET_2ND_ARCH, use:
LOCAL_NO_2ND_ARCH := true

Bug: 11654773
Change-Id: Ieb293d25b21024bfe1b554044df338e064ac7b46
2014-01-24 13:36:30 -08:00
Ying Wang
ec6d6262ac Replace all references to LOCAL_GENERATED_SOURCES with my_generated_sources
Now the RS generated sources are only appended to my_generated_sources.

Bug: 11654773
Change-Id: If8dbf3c08fed0b9945dd32b8c809331c17c4bc85
2014-01-24 13:35:47 -08:00
Ying Wang
4d2cc665ea Set up rules to build shared libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of shared_library_internal.mk.
Intermediate fils of libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/SHARED_LIBRARIES/libfoo_intermediates/
and the built libfoo.so will be in
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/lib.

Bug: 11654773
Change-Id: I58bbe5a05a65f63bce6279131552f3792000716e
2014-01-24 13:35:30 -08:00
Ying Wang
6ef6519170 Set up rules to build static libraries for TARGET_2ND_ARCH
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.

Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
2014-01-24 13:35:09 -08:00
Ying Wang
1d274d2686 Load compiler environment for a second arch.
This is the first step to build 32-bit libraries in a 64-bit product.
It will work like this:
1) In the product's BoardConfig.mk, define:
TARGET_2ND_ARCH, TARGET_2ND_ARCH_VARIANT, TARGET_2ND_CPU_VARIANT.
The build system uses those variables to set up an additional compiler
environment for the second arch.

2) When parsing Android.mks, the build system sets up rules to build a
module for both the 1st arch and the 2nd arch, unless it's explicitly
asked to skip so.
Android.mk will be adapted if there is additional rule of generating
source files.
The build system will accept arch-specific LOCAL_ variables, such as
LOCAL_CFLAGS_arm, LOCAL_CFLAGS_armv7-a-neon, LOCAL_CFLAGS_cortex-a15,
LOCAL_CFLAGS_aarch64 etc. Modules use such variables to set up build for
various archs at the same time.

3) Install binary of the 2nd arch by adding "<module_name>:32" to
PRODUCT_PACKAGES. All 2nd-arch libraries linked in by "<module_name>:32"
will be installed automatically.

Bug: 11654773
Change-Id: I2df63cd5463a07bf5358bee2a109f8fb9590fe30

Conflicts:
	core/combo/TARGET_linux-arm.mk
2014-01-24 13:34:26 -08:00
Colin Cross
4f0eb7d50c build: rename aarch64 target to arm64
Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
2014-01-23 22:39:38 -08:00
Ying Wang
62043de346 Merge "Revert "Fix filter rule when checking for apks in PRODUCT_COPY_FILES."" 2014-01-22 03:48:59 +00:00
Ying Wang
06b3255118 Revert "Fix filter rule when checking for apks in PRODUCT_COPY_FILES."
This reverts commit ca37190711.

Change-Id: I3a76f4cdf92ecbe3059bf5856cf341874e1393cf
2014-01-22 03:48:27 +00:00
Ying Wang
8d1f91fa54 Merge "Fix filter rule when checking for apks in PRODUCT_COPY_FILES." 2014-01-21 20:31:31 +00:00
Brian Carlstrom
0cf57dc99f Add missing paren in "java -version" check
Change-Id: Id66e795423e8d25b48ac996956748a93060ea5db
2014-01-20 23:48:45 -08:00
Robert Craig
ca37190711 Fix filter rule when checking for apks in PRODUCT_COPY_FILES.
PRODUCT_COPY_FILES entries can include the src:dest:owner
syntax versus src:dest. This causes the filter to miss
certain cases. Instead use the word-colon function to
grab the dest regardless of syntax.

Change-Id: I1f4e57a236c1db148bada0cfe5bd1e87bb1194d6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2014-01-17 09:13:50 -05:00