am cee5107c: am 4e51d8e6: am 4810a244: am 71e20e2e: am ef4d1081: Merge "update class header for deprecated info" into jb-dev-docs
* commit 'cee5107cf6a2ba53a729e7eedc7c9c91bd27aa1b':
update class header for deprecated info
diff --git a/core/Makefile b/core/Makefile
index e0f6da8..d501183 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -571,7 +571,7 @@
$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1))
$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
$(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1))
-$(if $(filter true, $(strip $(HAVE_SELINUX))), echo "selinux_fc=$(TARGET_ROOT_OUT)/file_contexts" >> $(1))
+$(hide) echo "selinux_fc=$(TARGET_ROOT_OUT)/file_contexts" >> $(1)
endef
# -----------------------------------------------------------------
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 854037d..0122411 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -43,7 +43,7 @@
# 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)/arm/arm-linux-androideabi-4.6
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi-
endif
@@ -114,11 +114,11 @@
TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
-# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
+# This warning causes dalvik not to build with gcc 4.6+ and -Werror.
# 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 4.6.%, $(shell $(TARGET_CC) --version)),)
+ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(shell $(TARGET_CC) --version)),)
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
-fno-strict-volatile-bitfields
endif
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index 7c7a9ef..da1f360 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -43,7 +43,7 @@
# 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_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/mipsel-linux-android-
endif
@@ -81,7 +81,7 @@
TARGET_GLOBAL_CFLAGS += \
$(TARGET_mips_CFLAGS) \
-Ulinux -U__unix -U__unix__ -Umips \
- -fpic \
+ -fpic -fPIE\
-ffunction-sections \
-fdata-sections \
-funwind-tables \
@@ -92,10 +92,10 @@
TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
-# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
+# This warning causes dalvik not to build with gcc 4.6+ 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)),)
+ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(shell $(TARGET_CC) --version)),)
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
-fno-strict-volatile-bitfields
endif
@@ -243,7 +243,7 @@
endef
define transform-o-to-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,--gc-sections \
-Wl,-z,nocopyreloc \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 0e7c17d..569914b 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -36,7 +36,7 @@
# 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-linux-android-4.6
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-linux-android-
endif
@@ -144,6 +144,7 @@
TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack
TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now
+TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel
TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections
TARGET_C_INCLUDES := \
diff --git a/core/config.mk b/core/config.mk
index 747d8ed..1af5a2a 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -225,6 +225,11 @@
endif
TARGET_CPU_ABI2 := $(strip $(TARGET_CPU_ABI2))
+# default target GCC version
+ifeq ($(strip $(TARGET_GCC_VERSION)),)
+TARGET_GCC_VERSION := 4.6
+endif
+
# $(1): os/arch
define select-android-config-h
build/core/combo/include/arch/$(1)/AndroidConfig.h
diff --git a/core/definitions.mk b/core/definitions.mk
index 986837b..a524b2f 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -178,7 +178,7 @@
define all-java-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.java" -and -not -name ".*") \
+ find -L $(1) -name "*.java" -and -not -name ".*") \
)
endef
@@ -200,7 +200,7 @@
define all-c-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.c" -and -not -name ".*") \
+ find -L $(1) -name "*.c" -and -not -name ".*") \
)
endef
@@ -222,7 +222,7 @@
define all-Iaidl-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "I*.aidl" -and -not -name ".*") \
+ find -L $(1) -name "I*.aidl" -and -not -name ".*") \
)
endef
@@ -243,7 +243,7 @@
define all-logtags-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.logtags" -and -not -name ".*") \
+ find -L $(1) -name "*.logtags" -and -not -name ".*") \
)
endef
@@ -256,7 +256,7 @@
define all-proto-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.proto" -and -not -name ".*") \
+ find -L $(1) -name "*.proto" -and -not -name ".*") \
)
endef
@@ -269,7 +269,7 @@
define all-renderscript-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) \( -name "*.rs" -or -name "*.fs" \) -and -not -name ".*") \
+ find -L $(1) \( -name "*.rs" -or -name "*.fs" \) -and -not -name ".*") \
)
endef
@@ -282,7 +282,7 @@
define all-html-files-under
$(patsubst ./%,%, \
$(shell cd $(LOCAL_PATH) ; \
- find $(1) -name "*.html" -and -not -name ".*") \
+ find -L $(1) -name "*.html" -and -not -name ".*") \
)
endef
@@ -301,7 +301,7 @@
###########################################################
define find-subdir-files
-$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) ; find $(1)))
+$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) ; find -L $(1)))
endef
###########################################################
@@ -314,7 +314,7 @@
define find-subdir-subdir-files
$(filter-out $(patsubst %,$(1)/%,$(3)),$(patsubst ./%,%,$(shell cd \
- $(LOCAL_PATH) ; find $(1) -maxdepth 1 -name $(2))))
+ $(LOCAL_PATH) ; find -L $(1) -maxdepth 1 -name $(2))))
endef
###########################################################
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 5298f35..c47aa0f 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -11,23 +11,23 @@
# Add the ARM toolchain bin dir if it actually exists
ifeq ($(TARGET_ARCH),arm)
- ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
+ ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)/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
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$(TARGET_GCC_VERSION)/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-linux-android-4.6/bin),)
+ ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)/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
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-linux-android-$(TARGET_GCC_VERSION)/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),)
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)/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
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mipsel-linux-android-$(TARGET_GCC_VERSION)/bin
endif
ANDROID_BUILD_PATHS := $(ABP)
diff --git a/core/main.mk b/core/main.mk
index 87488f4..27e68c4 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -275,11 +275,6 @@
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 user userdebug,$(TARGET_BUILD_VARIANT))
@@ -738,7 +733,6 @@
.PHONY: files
files: prebuilt \
$(modules_to_install) \
- $(modules_to_check) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET)
# -------------------------------------------------------------------
diff --git a/core/product_config.mk b/core/product_config.mk
index 75df954..e05907d 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -220,7 +220,7 @@
else
# Import just the current product.
ifndef current_product_makefile
-$(error Cannot locate config makefile for product "$(TARGET_PRODUCT)")
+$(error Can not locate config makefile for product "$(TARGET_PRODUCT)")
endif
ifneq (1,$(words $(current_product_makefile)))
$(error Product "$(TARGET_PRODUCT)" ambiguous: matches $(current_product_makefile))
diff --git a/target/product/core.mk b/target/product/core.mk
index 831298a..2357345 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -129,10 +129,15 @@
lint \
uiautomator \
telephony-common \
- mms-common \
- zoneinfo.dat \
- zoneinfo.idx \
- zoneinfo.version
+ mms-common
+
+# SELinux packages
+PRODUCT_PACKAGES += \
+ sepolicy \
+ file_contexts \
+ seapp_contexts \
+ property_contexts \
+ mac_permissions.xml
PRODUCT_COPY_FILES += \
system/core/rootdir/init.usb.rc:root/init.usb.rc \
@@ -151,20 +156,7 @@
libjavacore \
libssl \
libz-host \
- dalvik \
- zoneinfo-host.dat \
- zoneinfo-host.idx \
- zoneinfo-host.version
-endif
-
-ifeq ($(HAVE_SELINUX),true)
- PRODUCT_PACKAGES += \
- sepolicy \
- file_contexts \
- seapp_contexts \
- property_contexts \
- mac_permissions.xml
+ dalvik
endif
$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)
-