Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d07c732 authored by Al Sutton's avatar Al Sutton Committed by Jean-Baptiste Queru
Browse files

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: default avatarAl Sutton <al@funkyandroid.com>
parent d0831659
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -42,8 +42,18 @@ endif # build_mac_version is 10.6
HOST_GLOBAL_CFLAGS += -fPIC
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error


HOST_CC := $(CC)
GCC_REALPATH = $(realpath $(shell which gcc))
HOST_CXX := $(CXX)
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_AR := $(AR)
HOST_STRIP := $(STRIP)
HOST_STRIP := $(STRIP)
HOST_STRIP_COMMAND = $(HOST_STRIP) --strip-debug $< -o $@
HOST_STRIP_COMMAND = $(HOST_STRIP) --strip-debug $< -o $@