summaryrefslogtreecommitdiffstats
path: root/core/combo/TARGET_linux-arm.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-01-30 10:25:38 -0800
committerYing Wang <wangying@google.com>2013-01-30 10:33:27 -0800
commitb6457c223b0d0a6fb2a1bd5f90844cd34cc7afbb (patch)
treeadbb98ff312e205ae93710edfc4049231a2bcb2e /core/combo/TARGET_linux-arm.mk
parent907f1513e8129b553c5f68934d40b8df58ed38ff (diff)
downloadbuild-b6457c223b0d0a6fb2a1bd5f90844cd34cc7afbb.zip
build-b6457c223b0d0a6fb2a1bd5f90844cd34cc7afbb.tar.gz
build-b6457c223b0d0a6fb2a1bd5f90844cd34cc7afbb.tar.bz2
Don't fall back to host $(CC) if the target gcc is not checked out
Error "cc1plus: error: unrecognized command line option ‘-mfloat-abi=softfp’" is much more confusing than "...gcc: No such file or directory". Also we don't build in Windows/Cygwin any more so we don't need the old trick. Change-Id: Ibbe3da67b412575e56bd6e61ef412ea5b2789fea
Diffstat (limited to 'core/combo/TARGET_linux-arm.mk')
-rw-r--r--core/combo/TARGET_linux-arm.mk32
1 files changed, 14 insertions, 18 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 25af199..278d5ee 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
@@ -124,7 +120,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
@@ -181,6 +177,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.
@@ -188,8 +186,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.