Merge pull request #29 from jet082/master

Fix for iOS
This commit is contained in:
Twinaphex 2019-11-16 09:39:48 +01:00 committed by GitHub
commit 8e26e89a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -11,9 +11,14 @@ else ifneq (,$(findstring ios,$(platform)))
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
CXX = c++ -arch arm64 -isysroot $(IOSSDK)
flags += -DIOS -DHAVE_POSIX_MEMALIGN -DDARWIN_USE_64_BIT_INODE
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
CXX = c++ -arch armv7 -isysroot $(IOSSDK)
endif
ifeq ($(platform),ios9)
CC += -miphoneos-version-min=8.0
COMMONFLAGS += -miphoneos-version-min=8.0
@ -94,8 +99,14 @@ obj/nes-cheat.o: $(nes)/cheat/cheat.cpp $(call rwildcard,$(nes)/cheat/)
obj/libnes.o: libretro/libretro.cpp $(call rwildcard,libretro/)
obj/libco.o: libco/libco.c
c := $(CC) -std=gnu99
cpp := $(CXX) #-std=gnu++0x
ifeq ($(platform),ios-arm64)
c := $(CC) -Wno-error=implicit-function-declaration -std=gnu99
cpp := $(CXX) -std=c++11 -stdlib=libc++ #-std=gnu++0x
else
c := $(CC) -std=gnu99
cpp := $(CXX) #-std=gnu++0x
endif
flags += $(opt) -fomit-frame-pointer -fno-tree-vectorize -I. $(fpic)
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"

View File

@ -7,7 +7,7 @@
#include <nall/utility.hpp>
#include <nall/windows/utf8.hpp>
#if defined(__HAIKU__) || (defined(__ANDROID__) && __ANDROID_API__ < 21)
#if defined(__HAIKU__) || (defined(__ANDROID__) && __ANDROID_API__ < 21) || defined(IOS)
// in Haiku, stat64 is just a stat; android api < 21 doesn't define it either
#define stat64 stat
#endif