summaryrefslogtreecommitdiffstats
path: root/core/combo/TARGET_linux-arm64.mk
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-16 12:18:14 -0700
committerBen Cheng <bccheng@google.com>2014-04-16 12:18:14 -0700
commit084a7f83875d030c2e4819bed386c4a16168e731 (patch)
tree56a4af5a53f307ad5ed6a16be91f202eafabe11f /core/combo/TARGET_linux-arm64.mk
parentd32bbe7d060ac92c062a6d57c747ffc319aa5f86 (diff)
downloadbuild-084a7f83875d030c2e4819bed386c4a16168e731.zip
build-084a7f83875d030c2e4819bed386c4a16168e731.tar.gz
build-084a7f83875d030c2e4819bed386c4a16168e731.tar.bz2
Use aarch64-linux-android-4.9 for arm64 build (attempt #3)
GCC: 4.9 (which supports -fstack-protector) Binutils: 2.24 (which supports gc-sections) GDB: 7.7 NDK libraries are still picked up from prebuilts/ndk/*/4.8/* GCC has been patched to disable codegen for calling __cxa_throw_bad_array_new_length. Change-Id: Ie0bf38357c0cf3d265d8b5dd3c2b8a8fd83b1de1
Diffstat (limited to 'core/combo/TARGET_linux-arm64.mk')
-rw-r--r--core/combo/TARGET_linux-arm64.mk11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk
index 6bb3754..7860f4d 100644
--- a/core/combo/TARGET_linux-arm64.mk
+++ b/core/combo/TARGET_linux-arm64.mk
@@ -38,7 +38,7 @@ endif
TARGET_NDK_GCC_VERSION := 4.8
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
-TARGET_GCC_VERSION := 4.8
+TARGET_GCC_VERSION := 4.9
else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
@@ -73,13 +73,9 @@ TARGET_GLOBAL_CFLAGS += \
android_config_h := $(call select-android-config-h,linux-arm64)
-# HACK: globally disable -fstack-protector until the toolchain supports it
-TARGET_GLOBAL_UNSUPPORTED_CFLAGS := \
- -fstack-protector \
- -fstack-protector-all \
-
TARGET_GLOBAL_CFLAGS += \
-fpic -fPIE \
+ -fstack-protector \
-ffunction-sections \
-fdata-sections \
-funwind-tables \
@@ -163,6 +159,7 @@ TARGET_CUSTOM_LD_COMMAND := true
define transform-o-to-shared-lib-inner
$(hide) $(PRIVATE_CXX) \
-nostdlib -Wl,-soname,$(notdir $@) \
+ -Wl,--gc-sections \
-Wl,-shared,-Bsymbolic \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
@@ -186,6 +183,7 @@ endef
define transform-o-to-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
-Wl,-dynamic-linker,/system/bin/linker64 \
+ -Wl,--gc-sections \
-Wl,-z,nocopyreloc \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
-Wl,-rpath-link=$(PRIVATE_TARGET_OUT_INTERMEDIATE_LIBRARIES) \
@@ -209,6 +207,7 @@ endef
define transform-o-to-static-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
+ -Wl,--gc-sections \
-o $@ \
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_STATIC_O)) \