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.mk33
1 files changed, 15 insertions, 18 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index cb10542..172ed00 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -53,21 +53,17 @@ TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androi
TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi-
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
+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
TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
@@ -117,7 +113,7 @@ TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_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 4.6.% 4.7 4.7.%, $(shell $(TARGET_CC) --version)),)
+ifneq ($(filter 4.6 4.6.% 4.7 4.7.%, $(TARGET_GCC_VERSION)),)
TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
-fno-strict-volatile-bitfields
endif
@@ -137,6 +133,7 @@ TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--warn-shared-textrel \
+ -Wl,--fatal-warnings \
-Wl,--icf=safe \
$(arch_variant_ldflags)
@@ -165,6 +162,8 @@ ifneq ($(wildcard $(TARGET_CC)),)
# any flags which affect libgcc are correctly taken
# into account.
TARGET_LIBGCC := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) -print-libgcc-file-name)
+target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \
+ -print-file-name=libgcov.a)
endif
# Define FDO (Feedback Directed Optimization) options.
@@ -172,8 +171,6 @@ endif
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.