aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Sutton <al@funkyandroid.com>2012-02-23 18:14:27 +0000
committerJean-Baptiste Queru <jbq@google.com>2012-05-02 07:11:27 -0700
commit0d07c732c79ec5d624dea2fa0198ffc2dfeafe2b (patch)
tree8d48eaab586d60305d6ea9a7be31ec5054979fac
parentd0831659af544b93f3a9592a1cd4f85ff89e8635 (diff)
downloadbuild-0d07c732c79ec5d624dea2fa0198ffc2dfeafe2b.tar.gz
Force use of compatibility compilers on Apple's command line tools
The cc and c++ compilers included in Apple's command line tools show some unusual behaviour which causes the build to fail in several projects under Xcode 4.3 This patch uses the gnu compatibility gcc and g++ compilers on OS X instead to reduce problems, and generates an error when an llvm based compiler is detected because they currently do not generate usable emulator executables due to them not honouring global register variables. Change-Id: I506c22dad3dcbd41df3c7672802a675d3655e262 Signed-off-by: Al Sutton <al@funkyandroid.com>
-rw-r--r--core/combo/HOST_darwin-x86.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 54a64a352f..2a120d9b87 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -42,8 +42,18 @@ endif # build_mac_version is 10.6
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
-HOST_CC := $(CC)
-HOST_CXX := $(CXX)
+GCC_REALPATH = $(realpath $(shell which gcc))
+ifneq ($(findstring llvm-gcc,$(GCC_REALPATH)),)
+ # Using LLVM GCC results in a non functional emulator due to it
+ # not honouring global register variables
+ $(warning ****************************************)
+ $(warning * gcc is linked to llvm-gcc which will *)
+ $(warning * not create a useable emulator. *)
+ $(warning ****************************************)
+endif
+
+HOST_CC := gcc
+HOST_CXX := g++
HOST_AR := $(AR)
HOST_STRIP := $(STRIP)
HOST_STRIP_COMMAND = $(HOST_STRIP) --strip-debug $< -o $@