Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+25 -7
+7 -1
rbutil/libtools.make
··· 63 63 64 64 # OS X specifics. Needs to consider cross compiling for Windows. 65 65 ifeq ($(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. 68 + ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) 69 + CFLAGS += -mmacosx-version-min=10.5 70 + else 71 + # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. 67 72 # This creates fat objects, and ar can only create the archive but not operate 68 73 # on it. As a result the ar call must NOT use the u (update) flag. 69 74 ARCHFLAGS += -arch ppc -arch i386 ··· 72 77 CC = gcc-4.0 73 78 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 74 79 NATIVECC = gcc-4.0 80 + endif 75 81 endif 76 82 WINDRES = windres 77 83
+9 -3
tools/rbspeex/Makefile
··· 35 35 else 36 36 # OS X specifics. Needs to consider cross compiling for Windows. 37 37 ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) 38 - # when building libs for OS X build for both i386 and ppc at the same time. 38 + # When building for 10.4+ we need to use gcc. Otherwise clang is used, so use 39 + # that to determine if we need to set arch and isysroot. 40 + ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) 41 + CFLAGS += -mmacosx-version-min=10.5 42 + else 43 + # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. 39 44 # This creates fat objects, and ar can only create the archive but not operate 40 45 # on it. As a result the ar call must NOT use the u (update) flag. 41 - ARCHFLAGS = -arch ppc -arch i386 46 + ARCHFLAGS += -arch ppc -arch i386 42 47 # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) 43 48 # might need adjustment for older Xcode. 44 - CC ?= gcc-4.0 49 + CC = gcc-4.0 45 50 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 46 51 NATIVECC ?= gcc-4.0 52 + endif 47 53 COMPILETARGET = darwin 48 54 else 49 55 COMPILETARGET = posix
+9 -3
tools/ucl/src/Makefile
··· 32 32 else 33 33 # OS X specifics. Needs to consider cross compiling for Windows. 34 34 ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) 35 - # when building libs for OS X build for both i386 and ppc at the same time. 35 + # When building for 10.4+ we need to use gcc. Otherwise clang is used, so use 36 + # that to determine if we need to set arch and isysroot. 37 + ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) 38 + CFLAGS += -mmacosx-version-min=10.5 39 + else 40 + # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. 36 41 # This creates fat objects, and ar can only create the archive but not operate 37 42 # on it. As a result the ar call must NOT use the u (update) flag. 38 - ARCHFLAGS = -arch ppc -arch i386 43 + ARCHFLAGS += -arch ppc -arch i386 39 44 # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) 40 45 # might need adjustment for older Xcode. 41 - CC ?= gcc-4.0 46 + CC = gcc-4.0 42 47 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 43 48 NATIVECC ?= gcc-4.0 49 + endif 44 50 COMPILETARGET = darwin 45 51 else 46 52 COMPILETARGET = posix