Skip to content

Commit

Permalink
Merge pull request #1039 from jonesc-oci/iOS-changes
Browse files Browse the repository at this point in the history
Configuration changes for iOS builds.
  • Loading branch information
mitza-oci authored Feb 7, 2020
2 parents 9378215 + 76ee5a6 commit 4d7f655
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 31 deletions.
14 changes: 0 additions & 14 deletions ACE/ace/config-macosx-iOS-hardware.h

This file was deleted.

8 changes: 0 additions & 8 deletions ACE/ace/config-macosx-iOS-simulator.h

This file was deleted.

13 changes: 13 additions & 0 deletions ACE/ace/config-macosx-iOS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef ACE_CONFIG_MACOSX_IPHONE_H
#define ACE_CONFIG_MACOSX_IPHONE_H

#define ACE_HAS_IPHONE
#define ACE_LACKS_SYSTEM

#include "ace/config-macosx-mojave.h"

#ifdef ACE_HAS_SYSV_IPC
#undef ACE_HAS_SYSV_IPC
#endif

#endif /* ACE_CONFIG_MACOSX_IPHONE_H */
4 changes: 4 additions & 0 deletions ACE/ace/config-macosx-leopard.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,15 @@
#endif

#define ACE_LACKS_CONDATTR_SETCLOCK

#ifndef ACE_HAS_IPHONE
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
#define ACE_LACKS_CLOCKID_T
#define ACE_LACKS_CLOCK_MONOTONIC
#define ACE_LACKS_CLOCK_REALTIME
#endif
#endif

// dlcompat package (not part of base Darwin) is needed for dlopen().
// You may download directly from sourceforge and install or use fink
// Fink installer puts libraries in /sw/lib and headers in /sw/include
Expand Down
35 changes: 26 additions & 9 deletions ACE/include/makeinclude/platform_macosx_iOS.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,51 @@ else
XCODE:=/Applications/Xcode.app
endif

ifndef IPHONE_TARGET
$(error Please set IPHONE_TARGET to SIMULATOR or HARDWARE)
endif

ifeq ($(IPHONE_TARGET), SIMULATOR)
CROSS-COMPILE=1
IPHONE_PLATFORM:=$(XCODE)/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
IPHONE_SDK:=$(IPHONE_PLATFORM)/SDKs/iPhoneSimulator${IPHONE_VERSION}.sdk
IPHONE_HARDWARE_ARCHITECTURE=i386
IPHONE_HARDWARE_ARCHITECTURE=x86_64

# crt1.10.7.o is missing under MacOSX 10.7, fallback to 10.6
# until apple provides the missing crt1.10.7.o
CFLAGS += -mmacosx-version-min=10.6
CCFLAGS += -mmacosx-version-min=10.6
LDFLAGS += -mmacosx-version-min=10.6
# June 2017 release, iPhone 6s and later
CFLAGS += -miphoneos-version-min=12.0
CCFLAGS += -miphoneos-version-min=12.0
LDFLAGS += -miphoneos-version-min=12.0
endif

ifeq ($(IPHONE_TARGET), HARDWARE)
CROSS-COMPILE=1
IPHONE_PLATFORM:=$(XCODE)/Contents/Developer/Platforms/iPhoneOS.platform/Developer
IPHONE_SDK:=$(IPHONE_PLATFORM)/SDKs/iPhoneOS${IPHONE_VERSION}.sdk
IPHONE_HARDWARE_ARCHITECTURE=armv7
# arm64 iPhone 6 and later
IPHONE_HARDWARE_ARCHITECTURE=arm64

ifeq ($(iphone_bitcode),1)
# enable bitcode
CFLAGS += -fembed-bitcode
CCFLAGS += -fembed-bitcode
endif

ifeq ($(iphone_codesign),1)
CODESIGN_ALLOCATE:=$(IPHONE_PLATFORM)/usr/bin/codesign_allocate
POSTLINK=; codesign -f -s "iPhone Developer" $(BIN)
endif
rwho = 0
endif

# pass a flag to the preprocessor
CFLAGS += -DACE_HAS_IOS
CCFLAGS += -DACE_HAS_IOS

CC:=$(XCODE)/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CXX:=$(XCODE)/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
AR:=$(IPHONE_PLATFORM)/usr/bin/ar
RANLIB:=$(IPHONE_PLATFORM)/usr/bin/ranlib
AR:=$(XCODE)/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
ARFLAGS = rSv
RANLIB:=$(XCODE)/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib -no_warning_for_no_symbols
DLD = $(CXX)
LD = $(CXX)
CFLAGS += -arch $(IPHONE_HARDWARE_ARCHITECTURE) -isysroot $(IPHONE_SDK)
Expand Down

0 comments on commit 4d7f655

Please sign in to comment.