Skip to content

Commit 345a2ef

Browse files
committed
Makefile.common: gate RetroArchPlaylistManager.o on HAVE_COCOATOUCH
GCC 4.0 (Xcode 3.1, PowerPC) reports: In file included from RetroArchPlaylistManager.m:8: RetroArchPlaylistManager.h:14: error: syntax error before 'AT_NAME' token Commit cc1a131 gated RetroArchPlaylistManager.m out of the griffin unity build on non-COCOATOUCH targets, but missed this separate object entry in Makefile.common, which adds the file to OBJ unconditionally whenever HAVE_COCOA_COMMON is set (i.e. any Cocoa build, including macOS desktop). The qb/make build compiles each .o individually from this OBJ list, so it never saw the griffin-side gate. RetroArchPlaylistManager uses Obj-C lightweight generics and nullability macros (Xcode 7+, 2015), which GCC 4.0 can't parse. Wrap the line in ifeq ($(HAVE_COCOATOUCH), 1). HAVE_COCOATOUCH isn't currently set anywhere in Makefile.common — iOS builds go through Xcode projects, not make — so this effectively drops the file from the desktop make build. The gate leaves the door open for adding iOS make support later without another round-trip.
1 parent 5b9c5dc commit 345a2ef

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Makefile.common

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,8 +2602,15 @@ ifeq ($(HAVE_COCOA_COMMON),1)
26022602
DEFINES += -DHAVE_MAIN -DOSX -DHAVE_COCOA
26032603
OBJ += input/drivers/cocoa_input.o \
26042604
ui/drivers/ui_cocoa.o \
2605-
ui/drivers/cocoa/cocoa_common.o \
2606-
ui/drivers/cocoa/RetroArchPlaylistManager.o
2605+
ui/drivers/cocoa/cocoa_common.o
2606+
# RetroArchPlaylistManager uses Obj-C lightweight generics and
2607+
# nullability macros (Xcode 7+, 2015). Its only consumer,
2608+
# cocoa_launch_game_by_filename(), is iOS/tvOS-only. Gate on
2609+
# HAVE_COCOATOUCH so desktop (macOS) make-builds don't try to
2610+
# compile it - GCC 4.0 on PPC can't parse the Xcode 7 syntax.
2611+
ifeq ($(HAVE_COCOATOUCH), 1)
2612+
OBJ += ui/drivers/cocoa/RetroArchPlaylistManager.o
2613+
endif
26072614
LIBS += -framework Cocoa -framework AppKit -framework Foundation
26082615

26092616
ifeq ($(HAVE_OPENGL), 1)

0 commit comments

Comments
 (0)