summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Makefile28
-rw-r--r--core/base_rules.mk80
-rw-r--r--core/binary.mk9
-rw-r--r--core/build_id.mk2
-rw-r--r--core/clear_vars.mk2
-rw-r--r--core/combo/HOST_darwin-x86.mk52
-rw-r--r--core/combo/HOST_linux-x86.mk5
-rw-r--r--core/combo/HOST_windows-x86.mk4
-rw-r--r--core/combo/TARGET_linux-arm.mk12
-rw-r--r--core/combo/TARGET_linux-mips.mk284
-rw-r--r--core/combo/TARGET_linux-sh.mk179
-rw-r--r--core/combo/TARGET_linux-x86.mk13
-rw-r--r--core/combo/arch/mips/mips32-fp.mk14
-rw-r--r--core/combo/arch/mips/mips32.mk12
-rw-r--r--core/combo/arch/mips/mips32r2-fp.mk14
-rw-r--r--core/combo/arch/mips/mips32r2.mk12
-rw-r--r--core/combo/arch/mips/mips32r2dsp-fp.mk17
-rw-r--r--core/combo/arch/mips/mips32r2dsp.mk16
-rw-r--r--core/combo/arch/mips/mips32r2dspr2-fp.mk17
-rw-r--r--core/combo/arch/mips/mips32r2dspr2.mk16
-rw-r--r--core/combo/select.mk17
-rw-r--r--core/config.mk5
-rw-r--r--core/definitions.mk30
-rw-r--r--core/dex_preopt.mk2
-rw-r--r--core/dumpvar.mk24
-rw-r--r--core/envsetup.mk13
-rw-r--r--core/executable.mk12
-rw-r--r--core/legacy_prebuilts.mk5
-rw-r--r--core/llvm_config.mk8
-rw-r--r--core/main.mk109
-rw-r--r--core/product_config.mk6
-rw-r--r--core/shared_library.mk13
-rw-r--r--core/static_library.mk7
-rw-r--r--core/tasks/cts.mk2
-rw-r--r--core/tasks/product-graph.mk130
-rw-r--r--core/user_tags.mk497
-rw-r--r--core/version_defaults.mk4
37 files changed, 825 insertions, 847 deletions
diff --git a/core/Makefile b/core/Makefile
index 78b9f1e..3ed33dc 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -23,8 +23,13 @@ define check-product-copy-files
$(if $(filter %.apk, $(1)),$(error \
Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!))
endef
-unique_product_copy_files_destinations :=
+# filter out the duplicate <source file>:<dest file> pairs.
+unique_product_copy_files_pairs :=
$(foreach cf,$(PRODUCT_COPY_FILES), \
+ $(if $(filter $(unique_product_copy_files_pairs),$(cf)),,\
+ $(eval unique_product_copy_files_pairs += $(cf))))
+unique_product_copy_files_destinations :=
+$(foreach cf,$(unique_product_copy_files_pairs), \
$(eval _src := $(call word-colon,1,$(cf))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
$(call check-product-copy-files,$(cf)) \
@@ -36,6 +41,7 @@ $(foreach cf,$(PRODUCT_COPY_FILES), \
$(eval $(call copy-one-file,$(_src),$(_fulldest)))) \
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
$(eval unique_product_copy_files_destinations += $(_dest))))
+unique_product_copy_files_pairs :=
unique_product_copy_files_destinations :=
# -----------------------------------------------------------------
@@ -352,13 +358,9 @@ INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \
BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
-ifeq ($(HAVE_SELINUX),true)
-SELINUX_DEPENDS := sepolicy file_contexts seapp_contexts
-endif
-
# We just build this directly to the install location.
INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
-$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) $(SELINUX_DEPENDS) | $(MINIGZIP)
+$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
$(call pretty,"Target ram disk: $@")
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
@@ -707,7 +709,7 @@ ifdef is_tests_build
# $(tests_MODULES))
endif
-FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS) $(SELINUX_DEPENDS)
+FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS)
# -----------------------------------------------------------------
# installed file list
# Depending on anything that $(BUILT_SYSTEMIMAGE) depends on.
@@ -1156,7 +1158,7 @@ INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) $(SELINUX_DEPENDS)
+$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package OTA: $@"
$(hide) ./build/tools/releasetools/ota_from_target_files -v \
-p $(HOST_OUT) \
@@ -1184,7 +1186,7 @@ else
$(INTERNAL_UPDATE_PACKAGE_TARGET): extensions := $(TARGET_RELEASETOOLS_EXTENSIONS)
endif
-$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) $(SELINUX_DEPENDS)
+$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package: $@"
$(hide) ./build/tools/releasetools/img_from_target_files -v \
-s $(extensions) \
@@ -1298,7 +1300,7 @@ dalvikfiles: $(INTERNAL_DALVIK_MODULES)
# -----------------------------------------------------------------
# The emulator package
-
+ifeq ($(BUILD_EMULATOR),true)
INTERNAL_EMULATOR_PACKAGE_FILES += \
$(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \
prebuilts/qemu-kernel/$(TARGET_ARCH)/kernel-qemu \
@@ -1314,6 +1316,7 @@ $(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES)
@echo "Package: $@"
$(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES)
+endif
# -----------------------------------------------------------------
# Old PDK stuffs, retired
# The pdk package (Platform Development Kit)
@@ -1409,7 +1412,8 @@ deps := \
$(atree_dir)/sdk.atree \
$(sdk_tools_atree_files) \
$(HOST_OUT_EXECUTABLES)/atree \
- $(HOST_OUT_EXECUTABLES)/line_endings
+ $(ALL_HOST_INSTALLED_FILES) \
+ $(HOST_OUT_EXECUTABLES)/line_endings
INTERNAL_SDK_TARGET := $(sdk_dir)/$(sdk_name).zip
$(INTERNAL_SDK_TARGET): PRIVATE_NAME := $(sdk_name)
@@ -1433,6 +1437,7 @@ $(INTERNAL_SDK_TARGET): $(deps)
done; \
if [ $$FAIL ]; then exit 1; fi
$(hide) ( \
+ ATREE_STRIP="strip -x" \
$(HOST_OUT_EXECUTABLES)/atree \
$(addprefix -f ,$(PRIVATE_INPUT_FILES)) \
-m $(PRIVATE_DEP_FILE) \
@@ -1487,6 +1492,7 @@ $(INTERNAL_FINDBUGS_HTML_TARGET): $(INTERNAL_FINDBUGS_XML_TARGET)
# These are some additional build tasks that need to be run.
include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
-include $(sort $(wildcard vendor/*/build/tasks/*.mk))
+-include $(sort $(wildcard device/*/build/tasks/*.mk))
# -----------------------------------------------------------------
# Create SDK repository packages. Must be done after tasks/* since
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 51fb398..deb73ea 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -58,51 +58,31 @@ endif
LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE))
LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS))
ifeq (,$(LOCAL_MODULE_TAGS))
-ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE))
-LOCAL_MODULE_TAGS := optional
-else
-# Installable modules without tags fall back to user (which is changed to user eng below)
-LOCAL_MODULE_TAGS := user
+ LOCAL_MODULE_TAGS := optional
endif
-#$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST))))
+
+# User tags are not allowed anymore. Fail early because it will not be installed
+# like it used to be.
+ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
+ $(warning *** Module name: $(LOCAL_MODULE))
+ $(warning *** Makefile location: $(LOCAL_MODULE_MAKEFILE))
+ $(warning * )
+ $(warning * Module is attempting to use the 'user' tag. This)
+ $(warning * used to cause the module to be installed automatically.)
+ $(warning * Now, the module must be listed in the PRODUCT_PACKAGES)
+ $(warning * section of a product makefile to have it installed.)
+ $(warning * )
+ $(error user tag detected on module.)
endif
# Only the tags mentioned in this test are expected to be set by module
# makefiles. Anything else is either a typo or a source of unexpected
# behaviors.
-ifneq ($(filter-out user debug eng tests optional samples shell_ash shell_mksh,$(LOCAL_MODULE_TAGS)),)
+ifneq ($(filter-out debug eng tests optional samples shell_ash shell_mksh,$(LOCAL_MODULE_TAGS)),)
$(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH))
endif
-ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
- ifeq ($(filter $(GRANDFATHERED_USER_MODULES),$(LOCAL_MODULE)),)
- $(warning *** Module name: $(LOCAL_MODULE))
- $(warning *** Makefile location: $(LOCAL_PATH))
- $(warning * )
- $(warning * Each module must use a LOCAL_MODULE_TAGS in its)
- $(warning * Android.mk. Possible tags declared by a module:)
- $(warning * )
- $(warning * optional, debug, eng, tests, samples)
- $(warning * )
- $(warning * If the module is expected to be in all builds)
- $(warning * of a product, then it should use the)
- $(warning * "optional" tag: )
- $(warning * )
- $(warning * Add "LOCAL_MODULE_TAGS := optional" in the)
- $(warning * Android.mk for the affected module, and add)
- $(warning * the LOCAL_MODULE value for that component)
- $(warning * into the PRODUCT_PACKAGES section of product)
- $(warning * makefile(s) where it's necessary, if)
- $(warning * appropriate.)
- $(warning * )
- $(warning * If the component should be in EVERY build of ALL)
- $(warning * products, then add its LOCAL_MODULE value to the)
- $(warning * PRODUCT_PACKAGES section of)
- $(warning * build/target/product/core.mk)
- $(warning * )
- $(error user tag detected on new module - user tags are only supported on legacy modules)
- endif
-endif
+
# Add implicit tags.
#
@@ -117,27 +97,11 @@ ifneq ($(gpl_license_file),)
ALL_GPL_MODULE_LICENSE_FILES := $(sort $(ALL_GPL_MODULE_LICENSE_FILES) $(gpl_license_file))
endif
-#
-# If this module is listed on CUSTOM_MODULES, promote it to "user"
-# so that it will be installed in $(TARGET_OUT).
-#
-ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES)))
- LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS) user)
-endif
-
LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS))
ifneq ($(words $(LOCAL_MODULE_CLASS)),1)
$(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)")
endif
-# Those used to be implicitly ignored, but aren't any more.
-# As of 20100110 there are no apps with the user tag.
-ifeq ($(LOCAL_MODULE_CLASS),APPS)
- ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
- $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead)
- endif
-endif
-
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
ifdef LOCAL_IS_HOST_MODULE
partition_tag :=
@@ -544,6 +508,16 @@ $(installed_odex) : $(built_odex) | $(ACP)
$(LOCAL_INSTALLED_MODULE) : $(installed_odex)
endif
+# All host modules that are not tagged with optional are automatically installed.
+# Save the installed files in ALL_HOST_INSTALLED_FILES.
+ifeq ($(LOCAL_IS_HOST_MODULE),true)
+ ALL_HOST_INSTALLED_FILES += $(LOCAL_INSTALLED_MODULE)
+ ifneq ($(filter debug eng tests, $(LOCAL_MODULE_TAGS)),)
+ $(warning $(LOCAL_MODULE_MAKEFILE): Module "$(LOCAL_MODULE)" has useless module tags: $(filter debug eng tests, $(LOCAL_MODULE_TAGS)). It will be installed anyway.)
+ LOCAL_MODULE_TAGS := $(filter-out debug eng tests, $(LOCAL_MODULE_TAGS))
+ endif
+endif
+
endif # !LOCAL_UNINSTALLABLE_MODULE
@@ -593,6 +567,8 @@ ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \
$(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
$(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+ALL_MODULES.$(LOCAL_MODULE).MAKEFILE := \
+ $(ALL_MODULES.$(LOCAL_MODULE).MAKEFILE) $(LOCAL_MODULE_MAKEFILE)
ifdef LOCAL_MODULE_OWNER
ALL_MODULES.$(LOCAL_MODULE).OWNER := \
$(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER))
diff --git a/core/binary.mk b/core/binary.mk
index 04ac90b..04e0128 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -148,6 +148,15 @@ ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),)
LOCAL_LDFLAGS += $(TARGET_FDO_CFLAGS)
endif
+####################################################
+## Add profiling flags if aprof is turned on
+####################################################
+ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+ # -ffunction-sections and -fomit-frame-pointer are conflict with -pg
+ LOCAL_CFLAGS += -fno-omit-frame-pointer -fno-function-sections -pg
+ LOCAL_CPPFLAGS += -fno-omit-frame-pointer -fno-function-sections -pg
+endif
+
###########################################################
## Explicitly declare assembly-only __ASSEMBLY__ macro for
## assembly source
diff --git a/core/build_id.mk b/core/build_id.mk
index 40bb35d..e954794 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -23,7 +23,7 @@
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
-BUILD_ID := MASTER
+BUILD_ID := OPENMASTER
# DISPLAY_BUILD_NUMBER should only be set for development branches,
# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 0720efa..3137152 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -79,6 +79,8 @@ LOCAL_COPY_HEADERS_TO:=
LOCAL_COPY_HEADERS:=
LOCAL_FORCE_STATIC_EXECUTABLE:=
LOCAL_ADDITIONAL_DEPENDENCIES:=
+LOCAL_ENABLE_APROF:=
+LOCAL_ENABLE_APROF_JNI:=
LOCAL_COMPRESS_MODULE_SYMBOLS:=
LOCAL_STRIP_MODULE:=
LOCAL_POST_PROCESS_COMMAND:=true
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 198c53f..668998f 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -29,27 +29,55 @@ HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
-# Use the Mac OSX SDK 10.5 if the build host is 10.6
+ifneq ($(strip $(BUILD_HOST_static)),)
+# Statically-linked binaries are desirable for sandboxed environment
+HOST_GLOBAL_LDFLAGS += -static
+endif # BUILD_HOST_static
+
build_mac_version := $(shell sw_vers -productVersion)
-ifneq ($(filter 10.6.%, $(build_mac_version)),)
-sdk_105_root := /Developer/SDKs/MacOSX10.5.sdk
-ifeq ($(wildcard $(sdk_105_root)),)
+
+ifneq ($(strip $(BUILD_MAC_SDK_EXPERIMENTAL)),)
+# SDK 10.7 and higher is not fully compatible with Android.
+mac_sdk_versions_supported := 10.7 10.8
+else
+mac_sdk_versions_supported := 10.6
+endif # BUILD_MAC_SDK_EXPERIMENTAL
+mac_sdk_versions_installed := $(shell xcodebuild -showsdks |grep macosx | sort | sed -e "s/.*macosx//g")
+mac_sdk_version := $(firstword $(filter $(mac_sdk_versions_installed), $(mac_sdk_versions_supported)))
+ifeq ($(mac_sdk_version),)
+mac_sdk_version := $(firstword $(mac_sdk_versions_supported))
+endif
+
+mac_sdk_path := $(shell xcode-select -print-path)
+ifeq ($(findstring /Applications,$(mac_sdk_path)),)
+# Legacy Xcode
+mac_sdk_root := /Developer/SDKs/MacOSX$(mac_sdk_version).sdk
+else
+# Xcode 4.4(App Store) or higher
+# /Applications/Xcode*.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.?.sdk
+mac_sdk_root := $(mac_sdk_path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(mac_sdk_version).sdk
+endif
+
+ifeq ($(wildcard $(mac_sdk_root)),)
$(warning *****************************************************)
-$(warning * You are building on Mac OSX 10.6.)
-$(warning * Can not find SDK 10.5 at $(sdk_105_root))
+$(warning * Can not find SDK $(mac_sdk_version) at $(mac_sdk_root))
+ifeq ($(strip $(BUILD_MAC_SDK_EXPERIMENTAL)),)
+$(warning * If you wish to build using higher version of SDK, )
+$(warning * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before )
+$(warning * rerunning this command )
+endif
$(warning *****************************************************)
$(error Stop.)
endif
-HOST_GLOBAL_CFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
-HOST_GLOBAL_LDFLAGS += -isysroot $(sdk_105_root) -mmacosx-version-min=10.5
-endif # build_mac_version is 10.6
+HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
+HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version)
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
-HOST_CC := $(CC)
-HOST_CXX := $(CXX)
+HOST_CC := gcc
+HOST_CXX := g++
HOST_AR := $(AR)
HOST_STRIP := $(STRIP)
HOST_STRIP_COMMAND = $(HOST_STRIP) --strip-debug $< -o $@
@@ -59,7 +87,7 @@ HOST_JNILIB_SUFFIX := .jnilib
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-ifneq ($(filter 10.7.%, $(build_mac_version)),)
+ifneq ($(filter 10.7 10.7.% 10.8 10.8.%, $(build_mac_version)),)
HOST_RUN_RANLIB_AFTER_COPYING := false
else
HOST_RUN_RANLIB_AFTER_COPYING := true
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index a4da5ce..b369199 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -52,6 +52,11 @@ HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
endif # BUILD_HOST_64bit
+ifneq ($(strip $(BUILD_HOST_static)),)
+# Statically-linked binaries are desirable for sandboxed environment
+HOST_GLOBAL_LDFLAGS += -static
+endif # BUILD_HOST_static
+
HOST_GLOBAL_CFLAGS += -fPIC
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,linux-x86)
diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk
index fe4bd66..85bc1e0 100644
--- a/core/combo/HOST_windows-x86.mk
+++ b/core/combo/HOST_windows-x86.mk
@@ -46,6 +46,10 @@ HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX)
HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows)
HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup
+ifneq ($(strip $(BUILD_HOST_static)),)
+# Statically-linked binaries are desirable for sandboxed environment
+HOST_GLOBAL_LDFLAGS += -static
+endif # BUILD_HOST_static
# when building under Cygwin, ensure that we use Mingw compilation by default.
# you can disable this (i.e. to generate Cygwin executables) by defining the
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 4a461f8..75b2742 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -118,7 +118,7 @@ TARGET_GLOBAL_CFLAGS += \
# We cannot turn it off blindly since the option is not available
# in gcc-4.4.x. We also want to disable sincos optimization globally
# by turning off the builtin sin function.
-ifneq ($(filter 4.6.%, $(shell $(TARGET_CC) --version)),)
+ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),)
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
-fno-strict-volatile-bitfields
endif
@@ -181,7 +181,7 @@ TARGET_FDO_CFLAGS:=
TARGET_FDO_LIB:=
target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \
- --print-file-name=libgcov.a)
+ -print-file-name=libgcov.a)
ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
# Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
# The profile will be generated on /data/local/tmp/profile on the device.
@@ -252,8 +252,8 @@ $(hide) $(PRIVATE_CXX) \
-Wl,--gc-sections \
-Wl,-shared,-Bsymbolic \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
- $(PRIVATE_ALL_OBJECTS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
+ $(PRIVATE_ALL_OBJECTS) \
-Wl,--whole-archive \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
-Wl,--no-whole-archive \
@@ -280,6 +280,9 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
@@ -299,6 +302,9 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
$(TARGET_GLOBAL_LDFLAGS) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(call normalize-target-libraries,$(filter-out %libc_nomalloc.a,$(filter-out %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES)))) \
-Wl,--start-group \
$(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
new file mode 100644
index 0000000..0a7e20f
--- /dev/null
+++ b/core/combo/TARGET_linux-mips.mk
@@ -0,0 +1,284 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Configuration for Linux on MIPS.
+# Included by combo/select.mk
+
+# You can set TARGET_ARCH_VARIANT to use an arch version other
+# than mips32r2-fp. Each value should correspond to a file named
+# $(BUILD_COMBOS)/arch/<name>.mk which must contain
+# makefile variable definitions similar to the preprocessor
+# defines in system/core/include/arch/<combo>/AndroidConfig.h. Their
+# purpose is to allow module Android.mk files to selectively compile
+# different versions of code based upon the funtionality and
+# instructions available in a given architecture version.
+#
+# The blocks also define specific arch_variant_cflags, which
+# include defines, and compiler settings for the given architecture
+# version.
+#
+ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
+TARGET_ARCH_VARIANT := mips32r2-fp
+endif
+
+TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
+ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
+$(error Unknown MIPS architecture variant: $(TARGET_ARCH_VARIANT))
+endif
+
+include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
+
+# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
+ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/mipsel-linux-android-
+endif
+
+# Only define these if there's actually a gcc in there.
+# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
+ifneq ($(wildcard $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)),)
+ TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
+ TARGET_CXX := $(TARGET_TOOLS_PREFIX)g++$(HOST_EXECUTABLE_SUFFIX)
+ TARGET_AR := $(TARGET_TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX)
+ TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX)
+ TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
+ TARGET_STRIP := $(TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX)
+ ifeq ($(TARGET_BUILD_VARIANT),user)
+ TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@
+ else
+ TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@ && \
+ $(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
+ endif
+endif
+
+TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
+
+TARGET_mips_CFLAGS := -O2 \
+ -fomit-frame-pointer \
+ -fno-strict-aliasing \
+ -funswitch-loops
+
+# Set FORCE_MIPS_DEBUGGING to "true" in your buildspec.mk
+# or in your environment to gdb debugging easier.
+# Don't forget to do a clean build.
+ifeq ($(FORCE_MIPS_DEBUGGING),true)
+ TARGET_mips_CFLAGS += -fno-omit-frame-pointer
+endif
+
+android_config_h := $(call select-android-config-h,linux-mips)
+arch_include_dir := $(dir $(android_config_h))
+
+TARGET_GLOBAL_CFLAGS += \
+ $(TARGET_mips_CFLAGS) \
+ -Ulinux -U__unix -U__unix__ -Umips \
+ -fpic \
+ -ffunction-sections \
+ -fdata-sections \
+ -funwind-tables \
+ -Werror=format-security \
+ $(arch_variant_cflags) \
+ -include $(android_config_h) \
+ -I $(arch_include_dir)
+
+# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
+# We cannot turn it off blindly since the option is not available
+# in gcc-4.4.x.
+ifneq ($(filter 4.6 4.6.%, $(shell $(TARGET_CC) --version)),)
+TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
+ -fno-strict-volatile-bitfields
+endif
+
+# This is to avoid the dreaded warning compiler message:
+# note: the mangling of 'va_list' has changed in GCC 4.4
+#
+# The fact that the mangling changed does not affect the NDK ABI
+# very fortunately (since none of the exposed APIs used va_list
+# in their exported C++ functions). Also, GCC 4.5 has already
+# removed the warning from the compiler.
+#
+TARGET_GLOBAL_CFLAGS += -Wno-psabi
+
+ifneq ($(ARCH_MIPS_PAGE_SHIFT),)
+TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT)
+endif
+
+TARGET_GLOBAL_LDFLAGS += \
+ $(arch_variant_ldflags)
+
+TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden \
+ -fno-use-cxa-atexit
+
+# More flags/options can be added here
+TARGET_RELEASE_CFLAGS := \
+ -DNDEBUG \
+ -g \
+ -Wstrict-aliasing=2 \
+ -fgcse-after-reload \
+ -frerun-cse-after-loop \
+ -frename-registers
+
+libc_root := bionic/libc
+libm_root := bionic/libm
+libstdc++_root := bionic/libstdc++
+libthread_db_root := bionic/libthread_db
+
+
+## on some hosts, the target cross-compiler is not available so do not run this command
+ifneq ($(wildcard $(TARGET_CC)),)
+# We compile with the global cflags to ensure that
+# any flags which affect libgcc are correctly taken
+# into account.
+TARGET_LIBGCC := \
+ $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) -print-file-name=libgcc.a)
+LIBGCC_EH := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) -print-file-name=libgcc_eh.a)
+ifneq ($(LIBGCC_EH),libgcc_eh.a)
+ TARGET_LIBGCC += $(LIBGCC_EH)
+endif
+endif
+
+# Define FDO (Feedback Directed Optimization) options.
+
+TARGET_FDO_CFLAGS:=
+TARGET_FDO_LIB:=
+
+target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \
+ --print-file-name=libgcov.a)
+ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
+ # Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
+ # The profile will be generated on /data/local/tmp/profile on the device.
+ TARGET_FDO_CFLAGS := -fprofile-generate=/data/local/tmp/profile -DANDROID_FDO
+ TARGET_FDO_LIB := $(target_libgcov)
+else
+ # If BUILD_FDO_INSTRUMENT is turned off, then consider doing the FDO optimizations.
+ # Set TARGET_FDO_PROFILE_PATH to set a custom profile directory for your build.
+ ifeq ($(strip $(TARGET_FDO_PROFILE_PATH)),)
+ TARGET_FDO_PROFILE_PATH := fdo/profiles/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT)
+ else
+ ifeq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),)
+ $(warning Custom TARGET_FDO_PROFILE_PATH supplied, but directory does not exist. Turn off FDO.)
+ endif
+ endif
+
+ # If the FDO profile directory can't be found, then FDO is off.
+ ifneq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),)
+ TARGET_FDO_CFLAGS := -fprofile-use=$(TARGET_FDO_PROFILE_PATH) -DANDROID_FDO
+ TARGET_FDO_LIB := $(target_libgcov)
+ endif
+endif
+
+
+# unless CUSTOM_KERNEL_HEADERS is defined, we're going to use
+# symlinks located in out/ to point to the appropriate kernel
+# headers. see 'config/kernel_headers.make' for more details
+#
+ifneq ($(CUSTOM_KERNEL_HEADERS),)
+ KERNEL_HEADERS_COMMON := $(CUSTOM_KERNEL_HEADERS)
+ KERNEL_HEADERS_ARCH := $(CUSTOM_KERNEL_HEADERS)
+else
+ KERNEL_HEADERS_COMMON := $(libc_root)/kernel/common
+ KERNEL_HEADERS_ARCH := $(libc_root)/kernel/arch-$(TARGET_ARCH)
+endif
+KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH)
+
+TARGET_C_INCLUDES := \
+ $(libc_root)/arch-mips/include \
+ $(libc_root)/include \
+ $(libstdc++_root)/include \
+ $(KERNEL_HEADERS) \
+ $(libm_root)/include \
+ $(libm_root)/include/mips \
+ $(libthread_db_root)/include
+
+TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
+TARGET_CRTBEGIN_DYNAMIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
+TARGET_CRTEND_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
+
+TARGET_CRTBEGIN_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o
+TARGET_CRTEND_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o
+
+TARGET_STRIP_MODULE:=true
+
+TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libstdc++ libm
+
+TARGET_CUSTOM_LD_COMMAND := true
+
+# Enable the Dalvik JIT compiler if not already specified.
+ifeq ($(strip $(WITH_JIT)),)
+ WITH_JIT := true
+endif
+
+define transform-o-to-shared-lib-inner
+$(hide) $(PRIVATE_CXX) \
+ -nostdlib -Wl,-soname,$(notdir $@) \
+ -Wl,--gc-sections \
+ -shared -Bsymbolic \
+ $(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
+ $(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
+ $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
+ -o $@ \
+ $(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
+ $(PRIVATE_TARGET_FDO_LIB) \
+ $(PRIVATE_TARGET_LIBGCC) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
+endef
+
+define transform-o-to-executable-inner
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic \
+ -Wl,-dynamic-linker,/system/bin/linker \
+ -Wl,--gc-sections \
+ -Wl,-z,nocopyreloc \
+ -o $@ \
+ $(TARGET_GLOBAL_LD_DIRS) \
+ -Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
+ $(PRIVATE_ALL_OBJECTS) \
+ $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+ $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
+ $(TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
+ $(TARGET_FDO_LIB) \
+ $(TARGET_LIBGCC) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
+endef
+
+define transform-o-to-static-executable-inner
+$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
+ -Wl,--gc-sections \
+ -o $@ \
+ $(TARGET_GLOBAL_LD_DIRS) \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
+ $(TARGET_GLOBAL_LDFLAGS) \
+ $(PRIVATE_LDFLAGS) \
+ $(PRIVATE_ALL_OBJECTS) \
+ $(call normalize-target-libraries,$(filter-out %libc_nomalloc.a,$(filter-out %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES)))) \
+ -Wl,--start-group \
+ $(call normalize-target-libraries,$(filter %libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
+ $(call normalize-target-libraries,$(filter %libc_nomalloc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
+ $(TARGET_FDO_LIB) \
+ $(TARGET_LIBGCC) \
+ -Wl,--end-group \
+ $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
+endef
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
deleted file mode 100644
index 88c6215..0000000
--- a/core/combo/TARGET_linux-sh.mk
+++ /dev/null
@@ -1,179 +0,0 @@
-#
-# Copyright (C) 2006 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Configuration for Linux on SuperH.
-# Included by combo/select.make
-
-# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
-ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLCHAIN_ROOT := prebuilt/$(HOST_PREBUILT_TAG)/toolchain/sh-4.3.3
-TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/sh-linux-gnu-
-endif
-
-TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
-TARGET_CXX := $(TARGET_TOOLS_PREFIX)c++$(HOST_EXECUTABLE_SUFFIX)
-TARGET_AR := $(TARGET_TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX)
-TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX)
-TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
-TARGET_STRIP := $(TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX)
-
-ifeq ($(TARGET_BUILD_VARIANT),user)
-TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@
-else
-TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@ && \
- $(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
-endif
-
-TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
-
-TARGET_sh_release_CFLAGS := -O2 \
- -fomit-frame-pointer \
- -fstrict-aliasing \
- -funswitch-loops \
- -finline-limit=300
-
-# When building for debug, compile everything as superh.
-TARGET_sh_debug_CFLAGS := $(TARGET_sh_release_CFLAGS) -fno-omit-frame-pointer -fno-strict-aliasing
-
-TARGET_GLOBAL_CFLAGS += \
- -fpic \
- -ffunction-sections \
- -funwind-tables \
- -fstack-protector \
- -include $(call select-android-config-h,linux-sh)
-
-TARGET_GLOBAL_CPPFLAGS += \
- -fno-use-cxa-atexit \
- -fvisibility-inlines-hidden
-
-TARGET_RELEASE_CFLAGS := \
- -DSK_RELEASE -DNDEBUG \
- -O2 -g \
- -Wstrict-aliasing=2 \
- -finline-functions \
- -fno-inline-functions-called-once \
- -fgcse-after-reload \
- -frerun-cse-after-loop \
- -frename-registers \
- -fno-builtin
-
-libc_root := bionic/libc
-libm_root := bionic/libm
-libstdc++_root := bionic/libstdc++
-libthread_db_root := bionic/libthread_db
-
-
-## on some hosts, the target cross-compiler is not available so do not run this command
-ifneq ($(wildcard $(TARGET_CC)),)
-# We compile with the global cflags to ensure that
-# any flags which affect libgcc are correctly taken
-# into account.
-LIBGCC_FILENAME := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) -print-libgcc-file-name)
-LIBGCC_EH_FILENAME := $(subst libgcc,libgcc_eh,$(LIBGCC_FILENAME))
-TARGET_LIBGCC := $(LIBGCC_EH_FILENAME) $(LIBGCC_FILENAME)
-endif
-
-# unless CUSTOM_KERNEL_HEADERS is defined, we're going to use
-# symlinks located in out/ to point to the appropriate kernel
-# headers. see 'config/kernel_headers.make' for more details
-#
-ifneq ($(CUSTOM_KERNEL_HEADERS),)
- KERNEL_HEADERS_COMMON := $(CUSTOM_KERNEL_HEADERS)
- KERNEL_HEADERS_ARCH := $(CUSTOM_KERNEL_HEADERS)
-else
- KERNEL_HEADERS_COMMON := $(libc_root)/kernel/common
- KERNEL_HEADERS_ARCH := $(libc_root)/kernel/arch-$(TARGET_ARCH)
-endif
-KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH)
-
-TARGET_C_INCLUDES := \
- $(libc_root)/arch-sh/include \
- $(libc_root)/include \
- $(libstdc++_root)/include \
- $(KERNEL_HEADERS) \
- $(libm_root)/include \
- $(libm_root)/include/sh \
- $(libthread_db_root)/include
-
-TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
-TARGET_CRTBEGIN_DYNAMIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
-TARGET_CRTEND_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
-
-TARGET_CRTBEGIN_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/sobegin.o
-TARGET_CRTEND_SO_O := $(TARGET_OUT_STATIC_LIBRARIES)/soend.o
-
-TARGET_STRIP_MODULE:=true
-
-TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libstdc++ libm
-
-TARGET_CUSTOM_LD_COMMAND := true
-define transform-o-to-shared-lib-inner
-$(hide) $(PRIVATE_CXX) \
- -nostdlib -Wl,-soname,$(notdir $@) -Wl,-T,$(BUILD_SYSTEM)/shlelf.xsc \
- -Wl,--gc-sections -Wl,-z,norelro \
- -Wl,-shared,-Bsymbolic \
- $(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
- $(PRIVATE_ALL_OBJECTS) \
- -Wl,--whole-archive \
- $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
- -Wl,--no-whole-archive \
- $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
- $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
- $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
- $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
- -o $@ \
- $(PRIVATE_LDFLAGS) \
- $(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
- $(PRIVATE_TARGET_LIBGCC) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O))
-endef
-
-define transform-o-to-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
- -Wl,-dynamic-linker,/system/bin/linker \
- -Wl,--gc-sections -Wl,-z,norelro \
- -Wl,-z,nocopyreloc \
- -o $@ \
- $(TARGET_GLOBAL_LD_DIRS) \
- -Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
- $(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
- $(PRIVATE_ALL_OBJECTS) \
- $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
- $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
- $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
- $(PRIVATE_LDFLAGS) \
- $(TARGET_LIBGCC) \
- $(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
-endef
-
-define transform-o-to-static-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/shlelf.x \
- -Wl,--gc-sections -Wl,-z,norelro \
- -o $@ \
- $(TARGET_GLOBAL_LD_DIRS) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
- $(PRIVATE_LDFLAGS) \
- $(PRIVATE_ALL_OBJECTS) \
- -Wl,--start-group \
- $(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
- -Wl,--end-group \
- $(TARGET_LIBGCC) \
- $(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
- $(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
-endef
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index dc4afb8..9a6e08e 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -36,8 +36,8 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3
-TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-android-linux-
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-linux-android-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -94,6 +94,7 @@ TARGET_GLOBAL_CFLAGS += \
-fstrict-aliasing \
-funswitch-loops \
-funwind-tables \
+ -fstack-protector \
-include $(call select-android-config-h,target_linux-x86)
# XXX: Not sure this is still needed. Must check with our toolchains.
@@ -104,7 +105,7 @@ TARGET_GLOBAL_CPPFLAGS += \
# however, there have been reports that this is sometimes not the case. So make
# them explicit here unless we have the time to carefully check it
#
-TARGET_GLOBAL_CFLAGS += -mstackrealign -msse3 -mfpmath=sse
+TARGET_GLOBAL_CFLAGS += -mstackrealign -msse3 -mfpmath=sse -m32
# XXX: These flags should not be defined here anymore. Instead, the Android.mk
# of the modules that depend on these features should instead check the
@@ -199,6 +200,9 @@ $(hide) $(PRIVATE_CXX) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
@@ -216,6 +220,9 @@ $(hide) $(PRIVATE_CXX) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
$(PRIVATE_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ -Wl,--whole-archive \
+ $(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+ -Wl,--no-whole-archive \
-Wl,--start-group \
$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(TARGET_LIBGCC) \
diff --git a/core/combo/arch/mips/mips32-fp.mk b/core/combo/arch/mips/mips32-fp.mk
new file mode 100644
index 0000000..e60bdac
--- /dev/null
+++ b/core/combo/arch/mips/mips32-fp.mk
@@ -0,0 +1,14 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32/hard-float/little-endian
+
+ARCH_MIPS_HAS_FPU :=true
+ARCH_HAVE_ALIGNED_DOUBLES :=true
+arch_variant_cflags := \
+ -EL \
+ -march=mips32 \
+ -mtune=mips32 \
+ -mips32 \
+ -mhard-float
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32.mk b/core/combo/arch/mips/mips32.mk
new file mode 100644
index 0000000..35ef0d8
--- /dev/null
+++ b/core/combo/arch/mips/mips32.mk
@@ -0,0 +1,12 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32/soft-float/little-endian
+
+arch_variant_cflags := \
+ -EL \
+ -march=mips32 \
+ -mtune=mips32 \
+ -mips32 \
+ -msoft-float
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2-fp.mk b/core/combo/arch/mips/mips32r2-fp.mk
new file mode 100644
index 0000000..a407f00
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2-fp.mk
@@ -0,0 +1,14 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/hard-float/little-endian
+
+ARCH_MIPS_HAS_FPU :=true
+ARCH_HAVE_ALIGNED_DOUBLES :=true
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -mhard-float
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2.mk b/core/combo/arch/mips/mips32r2.mk
new file mode 100644
index 0000000..369d499
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2.mk
@@ -0,0 +1,12 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/soft-float/little-endian
+
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -msoft-float
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2dsp-fp.mk b/core/combo/arch/mips/mips32r2dsp-fp.mk
new file mode 100644
index 0000000..886872d
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2dsp-fp.mk
@@ -0,0 +1,17 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
+
+ARCH_MIPS_HAS_DSP :=true
+ARCH_MIPS_DSP_REV :=1
+ARCH_MIPS_HAS_FPU :=true
+ARCH_HAVE_ALIGNED_DOUBLES :=true
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -mhard-float \
+ -mdsp
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2dsp.mk b/core/combo/arch/mips/mips32r2dsp.mk
new file mode 100644
index 0000000..e67adc7
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2dsp.mk
@@ -0,0 +1,16 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/soft-float/little-endian/dsp
+
+ARCH_MIPS_HAS_DSP :=true
+ARCH_MIPS_DSP_REV :=1
+
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -msoft-float \
+ -mdsp
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2dspr2-fp.mk b/core/combo/arch/mips/mips32r2dspr2-fp.mk
new file mode 100644
index 0000000..27e090d
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2dspr2-fp.mk
@@ -0,0 +1,17 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
+
+ARCH_MIPS_HAS_DSP :=true
+ARCH_MIPS_DSP_REV :=2
+ARCH_MIPS_HAS_FPU :=true
+ARCH_HAVE_ALIGNED_DOUBLES :=true
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -mhard-float \
+ -mdspr2
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/arch/mips/mips32r2dspr2.mk b/core/combo/arch/mips/mips32r2dspr2.mk
new file mode 100644
index 0000000..c493d9a
--- /dev/null
+++ b/core/combo/arch/mips/mips32r2dspr2.mk
@@ -0,0 +1,16 @@
+# Configuration for Android on MIPS.
+# Generating binaries for MIPS32R2/soft-float/little-endian/dsp
+
+ARCH_MIPS_HAS_DSP :=true
+ARCH_MIPS_DSP_REV :=2
+
+arch_variant_cflags := \
+ -EL \
+ -march=mips32r2 \
+ -mtune=mips32r2 \
+ -mips32r2 \
+ -msoft-float \
+ -mdspr2
+
+arch_variant_ldflags := \
+ -EL
diff --git a/core/combo/select.mk b/core/combo/select.mk
index 803cfc0..e485d00 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -60,6 +60,23 @@ $(combo_target)STATIC_LIB_SUFFIX := .a
include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
ifneq ($(USE_CCACHE),)
+ # The default check uses size and modification time, causing false misses
+ # since the mtime depends when the repo was checked out
+ export CCACHE_COMPILERCHECK := content
+
+ # See man page, optimizations to get more cache hits
+ # implies that __DATE__ and __TIME__ are not critical for functionality.
+ # Ignore include file modification time since it will depend on when
+ # the repo was checked out
+ export CCACHE_SLOPPINESS := time_macros,include_file_mtime,file_macro
+
+ # Turn all preprocessor absolute paths into relative paths.
+ # Fixes absolute paths in preprocessed source due to use of -g.
+ # We don't really use system headers much so the rootdir is
+ # fine; ensures these paths are relative for all Android trees
+ # on a workstation.
+ export CCACHE_BASEDIR := /
+
CCACHE_HOST_TAG := $(HOST_PREBUILT_TAG)
# If we are cross-compiling Windows binaries on Linux
# then use the linux ccache binary instead.
diff --git a/core/config.mk b/core/config.mk
index f02fbef..03e4245 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -148,6 +148,9 @@ ifneq ($(words $(board_config_mk)),1)
$(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
endif
include $(board_config_mk)
+ifeq ($(TARGET_ARCH),)
+ $(error TARGET_ARCH not defined by board config: $(board_config_mk))
+endif
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
board_config_mk :=
@@ -326,7 +329,7 @@ endif
ifeq ($(HOST_OS),darwin)
dir := $(HOST_OS)-$(HOST_ARCH)
endif
-OLD_FLEX := prebuilt/$(HOST_PREBUILT_TAG)/flex/flex-2.5.4a$(HOST_EXECUTABLE_SUFFIX)
+OLD_FLEX := prebuilts/misc/$(HOST_PREBUILT_TAG)/flex/flex-2.5.4a$(HOST_EXECUTABLE_SUFFIX)
ifeq ($(HOST_OS),darwin)
# Mac OS' screwy version of java uses a non-standard directory layout
diff --git a/core/definitions.mk b/core/definitions.mk
index 9fe0a11..4dace8d 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -55,6 +55,11 @@ ALL_MODULE_TAGS:=
# its sub-variables.)
ALL_MODULE_NAME_TAGS:=
+# All host modules are automatically installed (i.e. outside
+# of the product configuration scheme). This is a list of the
+# install targets (LOCAL_INSTALLED_MODULE).
+ALL_HOST_INSTALLED_FILES:=
+
# Full paths to all prebuilt files that will be copied
# (used to make the dependency on acp)
ALL_PREBUILT:=
@@ -756,12 +761,17 @@ endef
###########################################################
## Commands for munging the dependency files GCC generates
###########################################################
+# $(1): the input .d file
+# $(2): the output .P file
+define transform-d-to-p-args
+$(hide) cp $(1) $(2); \
+ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(1) >> $(2); \
+ rm -f $(1)
+endef
define transform-d-to-p
-$(hide) cp $(@:%.o=%.d) $(@:%.o=%.P); \
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
- rm -f $(@:%.o=%.d)
+$(call transform-d-to-p-args,$(@:%.o=%.d),$(@:%.o=%.P))
endef
###########################################################
@@ -883,7 +893,7 @@ define transform-cpp-to-o
@echo "target $(PRIVATE_ARM_MODE) C++: $(PRIVATE_MODULE) <= $<"
$(hide) $(PRIVATE_CXX) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
- @$(PRIVATE_IMPORT_INCLUDES) \
+ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -913,7 +923,7 @@ define transform-c-or-s-to-o-no-deps
@mkdir -p $(dir $@)
$(hide) $(PRIVATE_CC) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
- @$(PRIVATE_IMPORT_INCLUDES) \
+ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -975,7 +985,7 @@ define transform-host-cpp-to-o
@echo "host C++: $(PRIVATE_MODULE) <= $<"
$(hide) $(PRIVATE_CXX) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
- @$(PRIVATE_IMPORT_INCLUDES) \
+ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -1003,7 +1013,7 @@ define transform-host-c-or-s-to-o-no-deps
@mkdir -p $(dir $@)
$(hide) $(PRIVATE_CC) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
- @$(PRIVATE_IMPORT_INCLUDES) \
+ $(shell cat $(PRIVATE_IMPORT_INCLUDES)) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -2040,10 +2050,6 @@ endef
# when requested.
include $(BUILD_SYSTEM)/distdir.mk
-# -----------------------------------------------------------------
-# The modules allowed to use a user tag
-include $(BUILD_SYSTEM)/user_tags.mk
-
# broken:
# $(foreach file,$^,$(if $(findstring,.a,$(suffix $file)),-l$(file),$(file)))
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 38982c0..4c51b10 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -4,7 +4,7 @@
####################################
# TODO: replace it with device's BOOTCLASSPATH
-DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:android.policy:services:apache-xml
+DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:telephony-common:mms-common:android.policy:services:apache-xml
DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 0f7dd8f..5298f35 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -10,16 +10,26 @@ ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES)
endif
# Add the ARM toolchain bin dir if it actually exists
-ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
- # this should be copied to HOST_OUT_EXECUTABLES instead
- ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin
-endif
+ifeq ($(TARGET_ARCH),arm)
+ ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
+ # this should be copied to HOST_OUT_EXECUTABLES instead
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin
+ endif
+else ifeq ($(TARGET_ARCH),x86)
# Add the x86 toolchain bin dir if it actually exists
-ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin),)
- # this should be copied to HOST_OUT_EXECUTABLES instead
- ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin
+ ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin),)
+ # this should be copied to HOST_OUT_EXECUTABLES instead
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-4.6/bin
+ endif
endif
+
+# Add the mips toolchain bin dir if it actually exists
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin),)
+ # this should be copied to HOST_OUT_EXECUTABLES instead
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-4.6/bin
+endif
+
ANDROID_BUILD_PATHS := $(ABP)
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 74e9100..97b4467 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -33,7 +33,7 @@ endif
# ---------------------------------------------------------------
# Set up configuration for host machine. We don't do cross-
-# compiles except for arm, so the HOST is whatever we are
+# compiles except for arm/mips, so the HOST is whatever we are
# running on
UNAME := $(shell uname -sm)
@@ -114,23 +114,20 @@ TARGET_COPY_OUT_RECOVERY := recovery
# variables that we need in order to locate the output files.
include $(BUILD_SYSTEM)/product_config.mk
-build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT))
+build_variant := $(filter-out user userdebug eng tests,$(TARGET_BUILD_VARIANT))
ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
-$(error must be empty or one of: eng user userdebug tests)
+$(error must be empty or one of: user userdebug eng tests)
endif
# ---------------------------------------------------------------
# Set up configuration for target machine.
# The following must be set:
# TARGET_OS = { linux }
-# TARGET_ARCH = { arm | x86 }
+# TARGET_ARCH = { arm | x86 | mips }
-
-ifeq ($(TARGET_ARCH),)
-TARGET_ARCH := arm
-endif
TARGET_OS := linux
+# TARGET_ARCH should be set by BoardConfig.mk and will be checked later
# the target build type defaults to release
ifneq ($(TARGET_BUILD_TYPE),debug)
diff --git a/core/executable.mk b/core/executable.mk
index 6138adb..baebc3b 100644
--- a/core/executable.mk
+++ b/core/executable.mk
@@ -12,6 +12,18 @@ ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
endif
+####################################################
+## Add profiling libraries if aprof is turned
+####################################################
+ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+ ifeq ($(LOCAL_FORCE_STATIC_EXECUTABLE), true)
+ LOCAL_STATIC_LIBRARIES += libaprof libaprof_static libc libcutils
+ else
+ LOCAL_SHARED_LIBRARIES += libaprof libaprof_runtime libc
+ endif
+ LOCAL_WHOLE_STATIC_LIBRARIES += libaprof_aux
+endif
+
include $(BUILD_SYSTEM)/dynamic_binary.mk
ifeq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
diff --git a/core/legacy_prebuilts.mk b/core/legacy_prebuilts.mk
index 0e33a64..0a5f6d1 100644
--- a/core/legacy_prebuilts.mk
+++ b/core/legacy_prebuilts.mk
@@ -103,7 +103,4 @@ GRANDFATHERED_ALL_PREBUILT := \
ueventd.rc \
ueventd.stingray.rc \
vold.fstab \
- wl1271.bin \
- zoneinfo.dat \
- zoneinfo.idx \
- zoneinfo.version
+ wl1271.bin
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
index bc90b95..4145028 100644
--- a/core/llvm_config.mk
+++ b/core/llvm_config.mk
@@ -41,12 +41,12 @@ ifeq ($(TARGET_ARCH),arm)
endif
ifeq ($(TARGET_ARCH),x86)
CLANG_CONFIG_EXTRA_CFLAGS += \
- -target i686-android-linux \
+ -target i686-linux-android \
-nostdlibinc \
- -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-linux-android/bin
CLANG_CONFIG_EXTRA_LDFLAGS += \
- -target i686-android-linux \
- -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ -target i686-linux-android \
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-linux-android/bin
CLANG_CONFIG_UNKNOWN_CFLAGS += \
-finline-limit=300 \
-fno-inline-functions-called-once \
diff --git a/core/main.mk b/core/main.mk
index 407a529..7bd55b8 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -84,7 +84,7 @@ include $(BUILD_SYSTEM)/config.mk
# be generated correctly
include $(BUILD_SYSTEM)/cleanbuild.mk
-VERSION_CHECK_SEQUENCE_NUMBER := 2
+VERSION_CHECK_SEQUENCE_NUMBER := 3
-include $(OUT_DIR)/versions_checked.mk
ifneq ($(VERSION_CHECK_SEQUENCE_NUMBER),$(VERSIONS_CHECKED))
@@ -157,8 +157,44 @@ $(info ************************************************************)
$(error stop)
endif
+ifeq (darwin,$(HOST_OS))
+GCC_REALPATH = $(realpath $(shell which gcc))
+ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),)
+ # Using LLVM GCC results in a non functional emulator due to it
+ # not honouring global register variables
+ $(warning ****************************************)
+ $(warning * gcc is linked to llvm-gcc which will *)
+ $(warning * not create a useable emulator. *)
+ $(warning ****************************************)
+ BUILD_EMULATOR := false
+else
+ BUILD_EMULATOR := true
+endif
+# When building on Leopard or above, we need to use the 10.4 SDK
+# or the generated binary will not run on Tiger.
+darwin_version := $(strip $(shell sw_vers -productVersion))
+ifneq ($(filter 10.1 10.2 10.3 10.1.% 10.2.% 10.3.% 10.4 10.4.%,$(darwin_version)),)
+ $(error Building the Android emulator requires OS X 10.5 or above)
+endif
+ifneq ($(filter 10.5 10.5.% 10.6 10.6.%,$(darwin_version)),)
+ # We are on Leopard or Snow Leopard
+ MSDK=10.5
+else
+ # We are on Lion or beyond, and 10.6 SDK is the minimum in Xcode 4.x
+ MSDK=10.6
+endif
+MACOSX_SDK := /Developer/SDKs/MacOSX$(MSDK).sdk
+ifeq ($(strip $(wildcard $(MACOSX_SDK))),)
+ BUILD_EMULATOR := false
+endif
+else # HOST_OS is not darwin
+ BUILD_EMULATOR := true
+endif # HOST_OS is darwin
+
$(shell echo 'VERSIONS_CHECKED := $(VERSION_CHECK_SEQUENCE_NUMBER)' \
> $(OUT_DIR)/versions_checked.mk)
+$(shell echo 'BUILD_EMULATOR := $(BUILD_EMULATOR)' \
+ >> $(OUT_DIR)/versions_checked.mk)
endif
# These are the modifier targets that don't do anything themselves, but
@@ -188,13 +224,11 @@ include $(BUILD_SYSTEM)/definitions.mk
# Bring in dex_preopt.mk
include $(BUILD_SYSTEM)/dex_preopt.mk
-ifneq ($(filter eng user userdebug,$(MAKECMDGOALS)),)
+ifneq ($(filter user userdebug eng,$(MAKECMDGOALS)),)
$(info ***************************************************************)
$(info ***************************************************************)
-$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \
+$(info Do not pass '$(filter user userdebug eng tests,$(MAKECMDGOALS))' on \
the make command line.)
-# XXX The single quote on this line fixes gvim's syntax highlighting.
-# Without which, the rest of this file is impossible to read.
$(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or)
$(info choosecombo.)
$(info ***************************************************************)
@@ -236,16 +270,20 @@ ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),)
is_sdk_build := true
endif
+## have selinux ##
+ifeq ($(HAVE_SELINUX),true)
+ADDITIONAL_BUILD_PROPERTIES += ro.build.selinux=1
+endif # HAVE_SELINUX
## user/userdebug ##
-user_variant := $(filter userdebug user,$(TARGET_BUILD_VARIANT))
+user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
enable_target_debugging := true
+tags_to_install :=
ifneq (,$(user_variant))
# Target is secure in user builds.
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
- tags_to_install := user
ifeq ($(user_variant),userdebug)
# Pick up some extra useful tools
tags_to_install += debug
@@ -293,7 +331,7 @@ endif # !enable_target_debugging
## eng ##
ifeq ($(TARGET_BUILD_VARIANT),eng)
-tags_to_install := user debug eng
+tags_to_install := debug eng
ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),)
# Don't require the setup wizard on eng builds
ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\
@@ -305,7 +343,7 @@ endif
## tests ##
ifeq ($(TARGET_BUILD_VARIANT),tests)
-tags_to_install := user debug eng tests
+tags_to_install := debug eng tests
endif
## sdk ##
@@ -322,7 +360,7 @@ endif
# TODO: this should be eng I think. Since the sdk is built from the eng
# variant.
-tags_to_install := user debug eng
+tags_to_install := debug eng
ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true
ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes
else # !sdk
@@ -551,42 +589,46 @@ add-required-deps :=
# -------------------------------------------------------------------
# Figure out our module sets.
-
+#
# Of the modules defined by the component makefiles,
# determine what we actually want to build.
-Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \
- $(CUSTOM_MODULES))
-# TODO: Remove the 3 places in the tree that use
-# ALL_DEFAULT_INSTALLED_MODULES and get rid of it from this list.
ifdef FULL_BUILD
# The base list of modules to build for this product is specified
# by the appropriate product definition file, which was included
# by product_config.make.
- user_PACKAGES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)
- $(call expand-required-modules,user_PACKAGES,$(user_PACKAGES))
- user_PACKAGES := $(call module-installed-files, $(user_PACKAGES))
+ product_MODULES := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES)
+ $(call expand-required-modules,product_MODULES,$(product_MODULES))
+ product_FILES := $(call module-installed-files, $(product_MODULES))
+ ifeq (0,1)
+ $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)
+ $(foreach p,$(product_FILES),$(info : $(p)))
+ $(error done)
+ endif
else
# We're not doing a full build, and are probably only including
# a subset of the module makefiles. Don't try to build any modules
# requested by the product, because we probably won't have rules
# to build them.
- user_PACKAGES :=
+ product_FILES :=
endif
-# Use tags to get the non-APPS user modules. Use the product
-# definition files to get the APPS user modules.
-user_MODULES := $(sort $(call get-tagged-modules,user shell_$(TARGET_SHELL)))
-user_MODULES := $(user_MODULES) $(user_PACKAGES)
-eng_MODULES := $(sort $(call get-tagged-modules,eng))
+# When modules are tagged with debug eng or tests, they are installed
+# for those variants regardless of what the product spec says.
debug_MODULES := $(sort $(call get-tagged-modules,debug))
+eng_MODULES := $(sort $(call get-tagged-modules,eng))
tests_MODULES := $(sort $(call get-tagged-modules,tests))
-ifeq ($(strip $(tags_to_install)),)
-$(error ASSERTION FAILED: tags_to_install should not be empty)
-endif
-modules_to_install := $(sort $(Default_MODULES) \
- $(foreach tag,$(tags_to_install),$($(tag)_MODULES)))
+# TODO: Remove the 3 places in the tree that use ALL_DEFAULT_INSTALLED_MODULES
+# and get rid of it from this list.
+# TODO: The shell is chosen by magic. Do we still need this?
+modules_to_install := $(sort \
+ $(ALL_DEFAULT_INSTALLED_MODULES) \
+ $(product_FILES) \
+ $(foreach tag,$(tags_to_install),$($(tag)_MODULES)) \
+ $(call get-tagged-modules, shell_$(TARGET_SHELL)) \
+ $(CUSTOM_MODULES) \
+ )
# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
# Filter out (do not install) any overridden packages.
@@ -617,9 +659,11 @@ ifdef is_sdk_build
# Ensure every module listed in PRODUCT_PACKAGES gets something installed
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
- $(error Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
+ $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
endif
+# Install all of the host modules
+modules_to_install += $(sort $(modules_to_install) $(ALL_HOST_INSTALLED_FILES))
# build/core/Makefile contains extra stuff that we don't want to pollute this
# top-level makefile with. It expects that ALL_DEFAULT_INSTALLED_MODULES
@@ -632,6 +676,7 @@ ALL_DEFAULT_INSTALLED_MODULES :=
endif # dont_bother
+
# These are additional goals that we build, in order to make sure that there
# is as little code as possible in the tree that doesn't build.
modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
@@ -831,3 +876,7 @@ modules:
.PHONY: showcommands
showcommands:
@echo >/dev/null
+
+.PHONY: nothing
+nothing:
+ @echo Successfully read the makefiles.
diff --git a/core/product_config.mk b/core/product_config.mk
index ea3e517..9c85d2c 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -199,6 +199,12 @@ $(dump-products)
$(error done)
endif
+ifeq (a,b)
+$(info PRODUCTS -----------)
+$(foreach product, $(PRODUCTS), $(info $(PRODUCTS.$(product).PRODUCT_NAME)))# $(product)))
+$(error stop)
+endif
+
# Convert a short name like "sooner" into the path to the product
# file defining that product.
#
diff --git a/core/shared_library.mk b/core/shared_library.mk
index d715349..ab7480d 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -20,12 +20,25 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
$(error $(LOCAL_PATH): Can not set module stem for a library)
endif
+####################################################
+## Add profiling libraries if aprof is turned
+####################################################
+ifeq ($(strip $(LOCAL_ENABLE_APROF_JNI)),true)
+ LOCAL_ENABLE_APROF := true
+ LOCAL_WHOLE_STATIC_LIBRARIES += libaprof_jni
+endif
+
+ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+ LOCAL_SHARED_LIBRARIES += libaprof libaprof_runtime
+endif
+
# Put the built targets of all shared libraries in a common directory
# to simplify the link line.
OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
include $(BUILD_SYSTEM)/dynamic_binary.mk
+
# Define PRIVATE_ variables from global vars
my_target_global_ld_dirs := $(TARGET_GLOBAL_LD_DIRS)
my_target_global_ldflags := $(TARGET_GLOBAL_LDFLAGS)
diff --git a/core/static_library.mk b/core/static_library.mk
index 66e091b..2a8edfd 100644
--- a/core/static_library.mk
+++ b/core/static_library.mk
@@ -18,6 +18,13 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
$(error $(LOCAL_PATH): Can not set module stem for a library)
endif
+####################################################
+## Add profiling libraries if aprof is turned
+####################################################
+ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+ LOCAL_WHOLE_STATIC_LIBRARIES += libaprof
+endif
+
include $(BUILD_SYSTEM)/binary.mk
ifeq ($(LOCAL_RAW_STATIC_LIBRARY),true)
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 4f624d8..108e30b 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -25,7 +25,7 @@ CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar
CTS_TF_EXEC_PATH := $(HOST_OUT_EXECUTABLES)/cts-tradefed
CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
-VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests-tf,1,)
+VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)
VMTESTSTF_JAR := $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar
CTS_CORE_CASE_LIST := \
diff --git a/core/tasks/product-graph.mk b/core/tasks/product-graph.mk
index 6442252..1ccb20b 100644
--- a/core/tasks/product-graph.mk
+++ b/core/tasks/product-graph.mk
@@ -14,35 +14,127 @@
# limitations under the License.
#
+# the foreach and the if remove the single space entries that creep in because of the evals
+define gather-all-products
+$(sort $(foreach p, \
+ $(eval _all_products_visited := )
+ $(call all-products-inner, $(ALL_PRODUCTS)) \
+ , $(if $(strip $(p)),$(strip $(p)),)) \
+)
+endef
+
+define all-products-inner
+ $(foreach p,$(1),\
+ $(if $(filter $(p),$(_all_products_visited)),, \
+ $(p) \
+ $(eval _all_products_visited += $(p)) \
+ $(call all-products-inner, $(PRODUCTS.$(strip $(p)).INHERITS_FROM))
+ ) \
+ )
+endef
+
+
+this_makefile := build/core/tasks/product-graph.mk
+
+products_svg := $(OUT_DIR)/products.svg
products_pdf := $(OUT_DIR)/products.pdf
-products_graph := $(products_pdf:%.pdf=%.dot)
+products_graph := $(OUT_DIR)/products.dot
+ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),)
+products_list := $(INTERNAL_PRODUCT)
+else
+ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),--all)
+products_list := --all
+else
+products_list := $(foreach prod,$(ANDROID_PRODUCT_GRAPH),$(call resolve-short-product-name,$(prod)))
+endif
+endif
+
+really_all_products := $(call gather-all-products)
-$(products_graph):
- @echo Product graph DOT: $@
+$(products_graph): PRIVATE_PRODUCTS := $(really_all_products)
+$(products_graph): PRIVATE_PRODUCTS_FILTER := $(products_list)
+
+$(products_graph): $(this_makefile)
+ @echo Product graph DOT: $@ for $(PRIVATE_PRODUCTS_FILTER)
$(hide) ( \
echo 'digraph {'; \
echo 'graph [ ratio=.5 ];'; \
- $(foreach p,$(ALL_PRODUCTS), \
- $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), \
- echo \"$(d)\" -\> \"$(p)\";)) \
- $(foreach prod, \
- $(sort $(foreach p,$(ALL_PRODUCTS), \
- $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), \
- $(d))) \
- $(foreach p,$(ALL_PRODUCTS),$(p))), \
- echo \"$(prod)\" [ label=\"$(dir $(prod))\\n$(notdir $(prod))\"];) \
+ $(foreach p,$(PRIVATE_PRODUCTS), \
+ $(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), echo \"$(d)\" -\> \"$(p)\";)) \
+ $(foreach prod, $(PRIVATE_PRODUCTS), \
+ echo \"$(prod)\" [ \
+ label=\"$(dir $(prod))\\n$(notdir $(prod))\\n\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_MODEL)\\n$(PRODUCTS.$(strip $(prod)).PRODUCT_DEVICE)\" \
+ $(if $(filter $(prod),$(PRIVATE_PRODUCTS_FILTER)), style=\"filled\" fillcolor=\"#FFFDB0\",) \
+ fontcolor=\"darkblue\" href=\"products/$(prod).html\" \
+ ];) \
echo '}' \
- ) > $@
+ ) \
+ | ./build/tools/filter-product-graph.py $(PRIVATE_PRODUCTS_FILTER) \
+ > $@
+
+# Evaluates to the name of the product file
+# $(1) product file
+define product-debug-filename
+$(OUT_DIR)/products/$(strip $(1)).html
+endef
+
+# Makes a rule for the product debug info
+# $(1) product file
+define transform-product-debug
+$(OUT_DIR)/products/$(strip $(1)).txt: $(this_makefile)
+ @echo Product debug info file: $$@
+ $(hide) rm -f $$@
+ $(hide) mkdir -p $$(dir $$@)
+ $(hide) echo 'FILE=$(strip $(1))' >> $$@
+ $(hide) echo 'PRODUCT_NAME=$$(PRODUCTS.$(strip $(1)).PRODUCT_NAME)' >> $$@
+ $(hide) echo 'PRODUCT_MODEL=$$(PRODUCTS.$(strip $(1)).PRODUCT_MODEL)' >> $$@
+ $(hide) echo 'PRODUCT_LOCALES=$$(PRODUCTS.$(strip $(1)).PRODUCT_LOCALES)' >> $$@
+ $(hide) echo 'PRODUCT_AAPT_CONFIG=$$(PRODUCTS.$(strip $(1)).PRODUCT_AAPT_CONFIG)' >> $$@
+ $(hide) echo 'PRODUCT_AAPT_PREF_CONFIG=$$(PRODUCTS.$(strip $(1)).PRODUCT_AAPT_PREF_CONFIG)' >> $$@
+ $(hide) echo 'PRODUCT_PACKAGES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGES)' >> $$@
+ $(hide) echo 'PRODUCT_DEVICE=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEVICE)' >> $$@
+ $(hide) echo 'PRODUCT_MANUFACTURER=$$(PRODUCTS.$(strip $(1)).PRODUCT_MANUFACTURER)' >> $$@
+ $(hide) echo 'PRODUCT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PROPERTY_OVERRIDES)' >> $$@
+ $(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@
+ $(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@
+ $(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@
+ $(hide) echo 'PRODUCT_OTA_PUBLIC_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_OTA_PUBLIC_KEYS)' >> $$@
+ $(hide) echo 'PRODUCT_EXTRA_RECOVERY_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_EXTRA_RECOVERY_KEYS)' >> $$@
+ $(hide) echo 'PRODUCT_PACKAGE_OVERLAYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGE_OVERLAYS)' >> $$@
+ $(hide) echo 'DEVICE_PACKAGE_OVERLAYS=$$(PRODUCTS.$(strip $(1)).DEVICE_PACKAGE_OVERLAYS)' >> $$@
+ $(hide) echo 'PRODUCT_TAGS=$$(PRODUCTS.$(strip $(1)).PRODUCT_TAGS)' >> $$@
+ $(hide) echo 'PRODUCT_SDK_ADDON_NAME=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_NAME)' >> $$@
+ $(hide) echo 'PRODUCT_SDK_ADDON_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_COPY_FILES)' >> $$@
+ $(hide) echo 'PRODUCT_SDK_ADDON_COPY_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_COPY_MODULES)' >> $$@
+ $(hide) echo 'PRODUCT_SDK_ADDON_DOC_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SDK_ADDON_DOC_MODULES)' >> $$@
+ $(hide) echo 'PRODUCT_DEFAULT_WIFI_CHANNELS=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_WIFI_CHANNELS)' >> $$@
+ $(hide) echo 'PRODUCT_DEFAULT_DEV_CERTIFICATE=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_DEV_CERTIFICATE)' >> $$@
+ $(hide) echo 'PRODUCT_RESTRICT_VENDOR_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_RESTRICT_VENDOR_FILES)' >> $$@
+ $(hide) echo 'PRODUCT_FACTORY_RAMDISK_MODULES=$$(PRODUCTS.$(strip $(1)).PRODUCT_FACTORY_RAMDISK_MODULES)' >> $$@
+ $(hide) echo 'PRODUCT_VENDOR_KERNEL_HEADERS=$$(PRODUCTS.$(strip $(1)).PRODUCT_VENDOR_KERNEL_HEADERS)' >> $$@
-# This rule doesn't include any nodes that don't inherit from
-# anything or don't have anything inherit from them, to make the
-# graph more readable. To add that, add this line to the rule
-# below:
-# $(foreach p,$(ALL_PRODUCTS), echo \"$(p)\";) \
+$(call product-debug-filename, $(p)): \
+ $(OUT_DIR)/products/$(strip $(1)).txt \
+ build/tools/product_debug.py \
+ $(this_makefile)
+ @echo Product debug html file: $$@
+ $(hide) mkdir -p $$(dir $$@)
+ $(hide) cat $$< | build/tools/product_debug.py > $$@
+endef
+
+product_debug_files:=
+$(foreach p,$(really_all_products), \
+ $(eval $(call transform-product-debug, $(p))) \
+ $(eval product_debug_files += $(call product-debug-filename, $(p))) \
+ )
$(products_pdf): $(products_graph)
@echo Product graph PDF: $@
dot -Tpdf -Nshape=box -o $@ $<
-product-graph: $(products_pdf)
+$(products_svg): $(products_graph) $(product_debug_files)
+ @echo Product graph SVG: $@
+ dot -Tsvg -Nshape=box -o $@ $<
+
+product-graph: $(products_pdf) $(products_svg)
diff --git a/core/user_tags.mk b/core/user_tags.mk
deleted file mode 100644
index 24f563d..0000000
--- a/core/user_tags.mk
+++ /dev/null
@@ -1,497 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This is the list of modules grandfathered to use a user tag
-
-# DO NOT ADD ANY NEW MODULE TO THIS FILE
-#
-# user modules are hard to control and audit and we don't want
-# to add any new such module in the system
-
-GRANDFATHERED_USER_MODULES :=
-
--include vendor/google/user_tags.mk
-
-GRANDFATHERED_USER_MODULES += \
- 20-dns.conf \
- 95-configured \
- aapt \
- acp \
- adb \
- AdbWinApi \
- AdbWinUsbApi \
- adbd \
- aidl \
- am \
- android \
- android-common \
- android-common-carousel \
- android.policy \
- androidprefs \
- android.test.runner \
- ant \
- antlr-2.7.7 \
- anttasks \
- apicheck \
- apkcheck \
- applypatch \
- app_process \
- archquery \
- atree \
- audio \
- badblocks \
- badblocks_host \
- bb2sym \
- bb_dump \
- bbprof \
- bcc \
- bison \
- bluetoothd \
- bmgr \
- bootanimation \
- brcm_patchram_plus \
- bugreport \
- cfassembler \
- check_stack \
- check_trace \
- com.android.phone.common \
- com.android.vcard \
- commons-compress-1.0 \
- content \
- copybit.qsd8k \
- copybit.s5pc110 \
- coverage \
- cpufeatures \
- cts \
- CtsAppSecurityTests \
- cts-dalvik-buildutil \
- dasm \
- dbus-daemon \
- ddmlib \
- ddmlib-prebuilt \
- ddmlibTests \
- ddms \
- ddmuilib \
- debuggerd \
- descGen \
- dexgen \
- dexpreopt \
- dex-tools \
- dhcpcd \
- dhcpcd.conf \
- dhcpcd-run-hooks \
- dictTest \
- dnsmasq \
- doclava \
- draw9patch \
- dumpeventlog \
- dumpkey \
- dump_regions \
- dumpstate \
- dumpsys \
- dx-tests \
- e2fsck \
- e2fsck_host \
- easymock \
- easymocklib \
- edify \
- elftree \
- emmalib \
- emulator \
- emulator-arm \
- emulator-core \
- emulator-elff \
- emulator-hw \
- emulator-memcheck \
- emulator-tcg \
- emulator-ui \
- etc1tool \
- eventanalyzer \
- exc_dump \
- fastboot \
- framework \
- FrameworkCoreHostTests \
- frameworks-core-util-lib \
- fsck_msdos \
- fs_get_stats \
- fw_bcm4329_apsta.bin \
- fw_bcm4329.bin \
- genext2fs \
- gps.mahimahi \
- gralloc.default \
- gralloc.qsd8k \
- groovy-all-1.7.0 \
- grxmlcompile \
- guava \
- guavalib \
- gzip \
- hciattach \
- hierarchyviewer \
- hierarchyviewer1 \
- hierarchyviewer2 \
- hierarchyviewerlib \
- hist_trace \
- hosttestlib \
- icudata \
- idegen \
- ime \
- init \
- input \
- ip \
- jarjar \
- javax.obex \
- jcommon-1.0.12 \
- jdiff \
- jdwpspy \
- jfreechart-1.0.9 \
- jfreechart-1.0.9-swt \
- jsilver \
- jsr305 \
- jsr305lib \
- junit \
- jython \
- kxml2-2.3.0 \
- launch-wrapper \
- layoutlib \
- layoutlib_api \
- layoutlib_create \
- layoutlib_utils \
- liba2dp \
- libabi \
- libandroid \
- libandroid_runtime \
- libandroid_servers \
- libarity \
- libastl \
- libastl_host \
- libaudio \
- libaudioeffect_jni \
- libaudioflinger \
- libaudiointerface \
- libaudiopolicy \
- libaudiopolicybase \
- libbinder \
- libbluedroid \
- libbluetooth \
- libbluetoothd \
- libbuiltinplugin \
- libbundlewrapper \
- libbz \
- libc \
- libcamera_client \
- libcameraservice \
- libcamerastub \
- libc_common \
- libchromium_net \
- libc_nomalloc \
- libctest \
- libcutils \
- libdb \
- libdbus \
- libdiskconfig \
- libdiskconfig_host \
- libdl \
- libdrm1 \
- libdrm1_jni \
- libebl \
- libebl_arm \
- libebl_sh \
- libedify \
- libeffects \
- libEGL \
- libelf \
- libESR_Portable \
- libESR_Shared \
- libETC1 \
- libext \
- libext2_blkid \
- libext2_blkid_host \
- libext2_com_err \
- libext2_com_err_host \
- libext2_e2p \
- libext2_e2p_host \
- libext2fs \
- libext2fs_host \
- libext2_profile \
- libext2_profile_host \
- libext2_uuid \
- libext2_uuid_host \
- libfdlibm \
- libfdlibm-host \
- libFFTEm \
- libfst \
- libft2 \
- libgdbus_static \
- libgif \
- libGLES_android \
- libGLESv1_CM \
- libGLESv2 \
- libglib \
- libgui \
- libhardware \
- libhardware_legacy \
- libhost \
- libhyphenation \
- libiprouteutil \
- libiptc \
- libjnigraphics \
- libjni_latinime \
- libjpeg \
- libjs \
- liblinenoise \
- libloc_api-rpc \
- liblog \
- libm \
- libmedia \
- libmedia_jni \
- libmediaplayerservice \
- libmincrypt \
- libminelf \
- libminui \
- libminzip \
- libmtdutils \
- libmtp \
- libmusicbundle \
- libneo_cgi \
- libneo_cs \
- libneo_util \
- libnetlink \
- libnetutils \
- libop \
- libOpenSLES \
- libopensles_helper \
- libOpenSLESUT \
- libpcap \
- libpixelflinger \
- libpixelflinger_static \
- libpng \
- libpopt \
- libpower \
- libprotobuf-cpp-2.3.0-full \
- libprotobuf-cpp-2.3.0-lite \
- libprotobuf-java-2.3.0-lite \
- libprotobuf-java-2.3.0-micro \
- librecovery_ui_htc \
- libreference-ril \
- libreverb \
- libreverbwrapper \
- libril \
- librilproto-java \
- librpc \
- librtp_jni \
- libsafe_iop \
- libSDL \
- libSDLmain \
- libsensorservice \
- libskia \
- libskiagl \
- libsonivox \
- libsoundpool \
- libspeex \
- libsqlite \
- libsqlite3_android \
- libSR_AcousticModels \
- libSR_AcousticState \
- libSR_AudioIn \
- libSR_Core \
- libSR_EventLog \
- libSR_G2P \
- libSR_Grammar \
- libSR_Nametag \
- libSR_Recognizer \
- libSR_Semproc \
- libSR_Session \
- libSR_Vocabulary \
- libstagefright \
- libstagefright_aacdec \
- libstagefright_aacenc \
- libstagefright_amrnb_common \
- libstagefright_amrnbdec \
- libstagefright_amrnbenc \
- libstagefright_amrwbdec \
- libstagefright_amrwbenc \
- libstagefright_avc_common \
- libstagefright_avcdec \
- libstagefright_avcenc \
- libstagefright_color_conversion \
- libstagefright_enc_common \
- libstagefright_foundation \
- libstagefright_g711dec \
- libstagefright_httplive \
- libstagefrighthw \
- libstagefright_id3 \
- libstagefright_m4vh263dec \
- libstagefright_m4vh263enc \
- libstagefright_matroska \
- libstagefright_mp3dec \
- libstagefright_mpeg2ts \
- libstagefright_omx \
- libstagefright_rtsp \
- libstagefright_vorbisdec \
- libstagefright_vpxdec \
- libstagefright_yuv \
- libstdc++ \
- libstlport \
- libstlport_static \
- libstorage \
- libsurfaceflinger \
- libsurfaceflinger_client \
- libsvoxpico \
- libsystem_server \
- libsysutils \
- libthread_db \
- libtinyxml \
- libtomcrypt \
- libtommath \
- libttspico \
- libttssynthproxy \
- libui \
- libunz \
- libusbhost \
- libutil \
- libutils \
- libv8 \
- libvisualizer \
- libvorbisidec \
- libvpx \
- libwebcore \
- libwpa_client \
- libwrapsim \
- libxml2 \
- libxslt \
- libzipfile \
- lights.kraken \
- lights.qsd8k \
- line_endings \
- linker \
- llvm-rs-link \
- localize \
- logcat \
- logwrapper \
- lsd \
- make_cfst \
- makedict \
- make_ext4fs \
- make_g2g \
- makekeycodes \
- make_ve_grammar \
- mediaserver \
- minigzip \
- mkbootfs \
- mkbootimg \
- mke2fs \
- mke2fs_host \
- mksdcard \
- mksnapshot \
- mkstubs \
- mkuserimg.sh \
- mkyaffs2image \
- mockrilcontroller \
- monkey \
- monkeyrunner \
- MonkeyRunnerTest \
- mtp \
- mtpd \
- ndc \
- netcfg \
- netd \
- network \
- ninepatch \
- oauth \
- obbtool \
- omx_tests \
- org.eclipse.core.commands_3.4.0.I20080509-2000 \
- org.eclipse.equinox.common_3.4.0.v20080421-2006 \
- org.eclipse.jface_3.4.2.M20090107-0800 \
- org-netbeans-api-visual \
- org-openide-util \
- osgi \
- pand \
- parseStringTest \
- ping \
- platform.xml \
- pm \
- post_trace \
- pppd \
- preload \
- profile_pid \
- profile_trace \
- q2dm \
- q2g \
- qemu-android \
- racoon \
- read_addr \
- read_method \
- read_pid \
- read_trace \
- resize2fs \
- resize2fs_host \
- rgb2565 \
- rsg-generator \
- run-as \
- runtime \
- schedtest \
- screenshot \
- screenshot2 \
- sdcard \
- sdklauncher \
- sdklib \
- sdkmanager \
- sdkstats \
- sdkuilib \
- sdk_v4 \
- sdk_v5 \
- sdk_v6 \
- sdk_v7 \
- sdk_v8 \
- sdptool \
- service \
- servicemanager \
- services \
- sig \
- sig-check \
- sig-create \
- signapk \
- signature-tools \
- spec-progress \
- sqlite3 \
- stack_dump \
- stringtemplate \
- surfaceflinger \
- svc \
- swing-worker-1.1 \
- swt \
- system_server \
- tblgen \
- tc \
- temp_layoutlib \
- test_g2g \
- test-progress \
- test-progress-new \
- test_swiarb \
- test_zipfile \
- toolbox \
- traceview \
- tune2fs \
- tune2fs_host \
- usbtest \
- vdc \
- vm-tests \
- vold \
- wdsclient \
- wpa_supplicant \
- yuv420sp2rgb \
- zipalign
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 16f59f6..826601a 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@ ifeq "" "$(PLATFORM_VERSION)"
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 4.1.2
+ PLATFORM_VERSION := 4.1.2.3.4.5.6.7.8.9
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -59,7 +59,7 @@ endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# This is the current development code-name, if the build is not a final
# release build. If this is a final release build, it is simply "REL".
- PLATFORM_VERSION_CODENAME := REL
+ PLATFORM_VERSION_CODENAME := AOSP
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"