summaryrefslogtreecommitdiffstats
path: root/core/combo/TARGET_linux-arm.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/combo/TARGET_linux-arm.mk')
-rw-r--r--core/combo/TARGET_linux-arm.mk16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 8c89143..51192f8 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -102,7 +102,7 @@ android_config_h := $(call select-android-config-h,linux-arm)
arch_include_dir := $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += \
- -msoft-float -fpic \
+ -msoft-float -fpic -fPIE \
-ffunction-sections \
-fdata-sections \
-funwind-tables \
@@ -114,11 +114,13 @@ TARGET_GLOBAL_CFLAGS += \
-include $(android_config_h) \
-I $(arch_include_dir)
-# This warning causes dalvik not to build with gcc 4.6 and -Werror.
+# 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.0%, $(shell $(TARGET_CC) --version)),)
-TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable
+# 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)),)
+TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
+ -fno-strict-volatile-bitfields
endif
# This is to avoid the dreaded warning compiler message:
@@ -266,7 +268,7 @@ $(hide) $(PRIVATE_CXX) \
endef
define transform-o-to-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,--gc-sections \
-Wl,-z,nocopyreloc \
@@ -287,7 +289,7 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
endef
define transform-o-to-static-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
-Wl,--gc-sections \
-o $@ \
$(TARGET_GLOBAL_LD_DIRS) \