From 991a1e8753d355b438b8f5efb617cb28239ca8d5 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 25 Jul 2023 01:19:13 +0300 Subject: [PATCH] make: try to get osx build to detect stuff ... the way I want, like osx-arm64 is actually arm --- Makefile.libretro | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index d66ccc35..271c79ab 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -39,6 +39,13 @@ else ifeq ($(platform), tvos-arm64) endif CC = cc -arch arm64 -isysroot $(IOSSDK) CXX = c++ -arch arm64 -isysroot $(IOSSDK) +else ifeq ($(platform), osx) + ifeq ($(CROSS_COMPILE),1) + TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT) + CFLAGS += $(TARGET_RULE) + CXXFLAGS += $(TARGET_RULE) + LDFLAGS += $(TARGET_RULE) + endif else ifeq ($(platform), psl1ght) CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT) AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT) @@ -68,7 +75,7 @@ endif CC_AS ?= $(CC) TARGET_NAME := pcsx_rearmed -ARCH_DETECTED := $(shell $(CC) -dumpmachine | awk -F- '{print $$1}') +ARCH_DETECTED := $(shell $(CC) $(CFLAGS) -dumpmachine | awk -F- '{print $$1}') GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" ifneq ($(GIT_VERSION)," unknown") CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" @@ -152,22 +159,12 @@ else ifeq ($(platform), osx) DYNAREC := 0 TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC - HAVE_NEON = 0 MACSOSVER = `sw_vers -productVersion | cut -d. -f 1` OSXVER = `sw_vers -productVersion | cut -d. -f 2` OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` ifeq ($(OSX_LT_MAVERICKS),YES) fpic += -mmacosx-version-min=10.1 endif - - ifeq ($(CROSS_COMPILE),1) - TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT) - CFLAGS += $(TARGET_RULE) - CPPFLAGS += $(TARGET_RULE) - CXXFLAGS += $(TARGET_RULE) - LDFLAGS += $(TARGET_RULE) - endif - CFLAGS += $(ARCHFLAGS) CXXFLAGS += $(ARCHFLAGS) LDFLAGS += $(ARCHFLAGS) -- 2.39.5