summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2014-03-20 22:22:17 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2014-03-20 22:26:24 +0100
commit258e4ad850097f334beb033031b62a1039e3575b (patch)
tree85e31c8df9f45d174cda8cc133aa698303b2aad8 /rbutil
parentc18908d6bd493ea11c37df20dba3bc07d04539c2 (diff)
downloadrockbox-258e4ad850097f334beb033031b62a1039e3575b.tar.gz
rockbox-258e4ad850097f334beb033031b62a1039e3575b.zip
OS X: detect clang and build for x86 target only.
Newer versions of Xcode / OS X don't support PPC code anymore and replace gcc with clang. When clang is detected assume we want to build for the default architecture only and change the minimum OS X version to 10.5. Change-Id: I5843fa9bb3d957ec6f0a537e857608ad99c31517
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/libtools.make8
1 files changed, 7 insertions, 1 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make
index 4623808f94..7a125f98ea 100644
--- a/rbutil/libtools.make
+++ b/rbutil/libtools.make
@@ -63,7 +63,12 @@ $(info Compiler creates $(COMPILETARGET) binaries)
63 63
64# OS X specifics. Needs to consider cross compiling for Windows. 64# OS X specifics. Needs to consider cross compiling for Windows.
65ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) 65ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE)
66# when building libs for OS X build for both i386 and ppc at the same time. 66# When building for 10.4+ we need to use gcc. Otherwise clang is used, so use
67# that to determine if we need to set arch and isysroot.
68ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__)
69CFLAGS += -mmacosx-version-min=10.5
70else
71# when building libs for OS X 10.4+ build for both i386 and ppc at the same time.
67# This creates fat objects, and ar can only create the archive but not operate 72# This creates fat objects, and ar can only create the archive but not operate
68# on it. As a result the ar call must NOT use the u (update) flag. 73# on it. As a result the ar call must NOT use the u (update) flag.
69ARCHFLAGS += -arch ppc -arch i386 74ARCHFLAGS += -arch ppc -arch i386
@@ -73,6 +78,7 @@ CC = gcc-4.0
73CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 78CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
74NATIVECC = gcc-4.0 79NATIVECC = gcc-4.0
75endif 80endif
81endif
76WINDRES = windres 82WINDRES = windres
77 83
78BUILD_DIR ?= $(TARGET_DIR)build$(COMPILETARGET) 84BUILD_DIR ?= $(TARGET_DIR)build$(COMPILETARGET)