iOS fixes
This commit is contained in:
@@ -20,3 +20,4 @@ irix
|
|||||||
sparc-abi-check
|
sparc-abi-check
|
||||||
remove-debug-code
|
remove-debug-code
|
||||||
ungccify
|
ungccify
|
||||||
|
ios-fixes
|
||||||
|
|||||||
0
.pc/ios-fixes/.timestamp
Normal file
0
.pc/ios-fixes/.timestamp
Normal file
4528
.pc/ios-fixes/ChangeLog
Normal file
4528
.pc/ios-fixes/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
12
.pc/ios-fixes/build-ios.sh
Executable file
12
.pc/ios-fixes/build-ios.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
|
||||||
|
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
|
||||||
|
SDK_IOS_VERSION="4.1"
|
||||||
|
|
||||||
|
mkdir -p "build-ios"
|
||||||
|
pushd "build-ios"
|
||||||
|
export CC="${PLATFORM_IOS}"/Developer/usr/bin/gcc-4.2
|
||||||
|
export CFLAGS="-arch armv6 -isysroot ${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/"
|
||||||
|
../configure --host=arm-apple-darwin10 && make
|
||||||
|
popd
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
* src/prep_cif.c (UNLIKELY, LIKELY): Define.
|
* src/prep_cif.c (UNLIKELY, LIKELY): Define.
|
||||||
(initialize_aggregate): Check for bad types.
|
(initialize_aggregate): Check for bad types.
|
||||||
|
|
||||||
2011-02-09 Landon Fuller <landonf@macports.org>
|
2011-02-09 Landon Fuller <landonf@plausible.coop>
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
|
* Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
|
||||||
src/arm/trampoline.S.
|
src/arm/trampoline.S.
|
||||||
|
|||||||
69
build-ios.sh
69
build-ios.sh
@@ -2,11 +2,66 @@
|
|||||||
|
|
||||||
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
|
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
|
||||||
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
|
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
|
||||||
SDK_IOS_VERSION="4.1"
|
SDK_IOS_VERSION="4.2"
|
||||||
|
MIN_IOS_VERSION="3.0"
|
||||||
|
OUTPUT_DIR="universal-ios"
|
||||||
|
|
||||||
mkdir -p "build-ios"
|
build_target () {
|
||||||
pushd "build-ios"
|
local platform=$1
|
||||||
export CC="${PLATFORM_IOS}"/Developer/usr/bin/gcc-4.2
|
local sdk=$2
|
||||||
export CFLAGS="-arch armv6 -isysroot ${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/"
|
local arch=$3
|
||||||
../configure --host=arm-apple-darwin10 && make
|
local triple=$4
|
||||||
popd
|
local builddir=$5
|
||||||
|
|
||||||
|
mkdir -p "${builddir}"
|
||||||
|
pushd "${builddir}"
|
||||||
|
export CC="${platform}"/Developer/usr/bin/gcc-4.2
|
||||||
|
export CFLAGS="-arch ${arch} -isysroot ${sdk} -miphoneos-version-min=${MIN_IOS_VERSION}"
|
||||||
|
../configure --host=${triple} && make
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build all targets
|
||||||
|
build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv6 arm-apple-darwin10 armv6-ios
|
||||||
|
build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv7 arm-apple-darwin10 armv7-ios
|
||||||
|
build_target "${PLATFORM_IOS_SIM}" "${PLATFORM_IOS_SIM}/Developer/SDKs/iPhoneSimulator${SDK_IOS_VERSION}.sdk/" i386 i386-apple-darwin10 i386-ios-sim
|
||||||
|
|
||||||
|
# Create universal output directories
|
||||||
|
mkdir -p "${OUTPUT_DIR}"
|
||||||
|
mkdir -p "${OUTPUT_DIR}/include"
|
||||||
|
mkdir -p "${OUTPUT_DIR}/include/armv6"
|
||||||
|
mkdir -p "${OUTPUT_DIR}/include/armv7"
|
||||||
|
mkdir -p "${OUTPUT_DIR}/include/i386"
|
||||||
|
|
||||||
|
# Create the universal binary
|
||||||
|
lipo -create armv6-ios/.libs/libffi.a armv7-ios/.libs/libffi.a i386-ios-sim/.libs/libffi.a -output "${OUTPUT_DIR}/libffi.a"
|
||||||
|
|
||||||
|
# Copy in the headers
|
||||||
|
copy_headers () {
|
||||||
|
local src=$1
|
||||||
|
local dest=$2
|
||||||
|
|
||||||
|
# Fix non-relative header reference
|
||||||
|
sed 's/<ffitarget.h>/"ffitarget.h"/' < "${src}/include/ffi.h" > "${dest}/ffi.h"
|
||||||
|
cp "${src}/include/ffitarget.h" "${dest}"
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_headers armv6-ios "${OUTPUT_DIR}/include/armv6"
|
||||||
|
copy_headers armv7-ios "${OUTPUT_DIR}/include/armv7"
|
||||||
|
copy_headers i386-ios-sim "${OUTPUT_DIR}/include/i386"
|
||||||
|
|
||||||
|
# Create top-level header
|
||||||
|
(
|
||||||
|
cat << EOF
|
||||||
|
#ifdef __arm__
|
||||||
|
#include <arm/arch.h>
|
||||||
|
#ifdef _ARM_ARCH_6
|
||||||
|
#include "include/armv6/ffi.h"
|
||||||
|
#elif _ARM_ARCH_7
|
||||||
|
#include "include/armv7/ffi.h"
|
||||||
|
#endif
|
||||||
|
#elif defined(__i386__)
|
||||||
|
#include "include/i386/ffi.h"
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
) > "${OUTPUT_DIR}/ffi.h"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 11 February 2011
|
@set UPDATED 12 February 2011
|
||||||
@set UPDATED-MONTH February 2011
|
@set UPDATED-MONTH February 2011
|
||||||
@set EDITION 3.0.10rc3
|
@set EDITION 3.0.10rc4
|
||||||
@set VERSION 3.0.10rc3
|
@set VERSION 3.0.10rc4
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 11 February 2011
|
@set UPDATED 12 February 2011
|
||||||
@set UPDATED-MONTH February 2011
|
@set UPDATED-MONTH February 2011
|
||||||
@set EDITION 3.0.10rc3
|
@set EDITION 3.0.10rc4
|
||||||
@set VERSION 3.0.10rc3
|
@set VERSION 3.0.10rc4
|
||||||
|
|||||||
91
patches/ios-fixes
Normal file
91
patches/ios-fixes
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
Index: libffi/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- libffi.orig/ChangeLog
|
||||||
|
+++ libffi/ChangeLog
|
||||||
|
@@ -43,7 +43,7 @@
|
||||||
|
* src/prep_cif.c (UNLIKELY, LIKELY): Define.
|
||||||
|
(initialize_aggregate): Check for bad types.
|
||||||
|
|
||||||
|
-2011-02-09 Landon Fuller <landonf@macports.org>
|
||||||
|
+2011-02-09 Landon Fuller <landonf@plausible.coop>
|
||||||
|
|
||||||
|
* Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
|
||||||
|
src/arm/trampoline.S.
|
||||||
|
Index: libffi/build-ios.sh
|
||||||
|
===================================================================
|
||||||
|
--- libffi.orig/build-ios.sh
|
||||||
|
+++ libffi/build-ios.sh
|
||||||
|
@@ -2,11 +2,66 @@
|
||||||
|
|
||||||
|
PLATFORM_IOS=/Developer/Platforms/iPhoneOS.platform/
|
||||||
|
PLATFORM_IOS_SIM=/Developer/Platforms/iPhoneSimulator.platform/
|
||||||
|
-SDK_IOS_VERSION="4.1"
|
||||||
|
+SDK_IOS_VERSION="4.2"
|
||||||
|
+MIN_IOS_VERSION="3.0"
|
||||||
|
+OUTPUT_DIR="universal-ios"
|
||||||
|
|
||||||
|
-mkdir -p "build-ios"
|
||||||
|
-pushd "build-ios"
|
||||||
|
-export CC="${PLATFORM_IOS}"/Developer/usr/bin/gcc-4.2
|
||||||
|
-export CFLAGS="-arch armv6 -isysroot ${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/"
|
||||||
|
-../configure --host=arm-apple-darwin10 && make
|
||||||
|
-popd
|
||||||
|
+build_target () {
|
||||||
|
+ local platform=$1
|
||||||
|
+ local sdk=$2
|
||||||
|
+ local arch=$3
|
||||||
|
+ local triple=$4
|
||||||
|
+ local builddir=$5
|
||||||
|
+
|
||||||
|
+ mkdir -p "${builddir}"
|
||||||
|
+ pushd "${builddir}"
|
||||||
|
+ export CC="${platform}"/Developer/usr/bin/gcc-4.2
|
||||||
|
+ export CFLAGS="-arch ${arch} -isysroot ${sdk} -miphoneos-version-min=${MIN_IOS_VERSION}"
|
||||||
|
+ ../configure --host=${triple} && make
|
||||||
|
+ popd
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Build all targets
|
||||||
|
+build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv6 arm-apple-darwin10 armv6-ios
|
||||||
|
+build_target "${PLATFORM_IOS}" "${PLATFORM_IOS}/Developer/SDKs/iPhoneOS${SDK_IOS_VERSION}.sdk/" armv7 arm-apple-darwin10 armv7-ios
|
||||||
|
+build_target "${PLATFORM_IOS_SIM}" "${PLATFORM_IOS_SIM}/Developer/SDKs/iPhoneSimulator${SDK_IOS_VERSION}.sdk/" i386 i386-apple-darwin10 i386-ios-sim
|
||||||
|
+
|
||||||
|
+# Create universal output directories
|
||||||
|
+mkdir -p "${OUTPUT_DIR}"
|
||||||
|
+mkdir -p "${OUTPUT_DIR}/include"
|
||||||
|
+mkdir -p "${OUTPUT_DIR}/include/armv6"
|
||||||
|
+mkdir -p "${OUTPUT_DIR}/include/armv7"
|
||||||
|
+mkdir -p "${OUTPUT_DIR}/include/i386"
|
||||||
|
+
|
||||||
|
+# Create the universal binary
|
||||||
|
+lipo -create armv6-ios/.libs/libffi.a armv7-ios/.libs/libffi.a i386-ios-sim/.libs/libffi.a -output "${OUTPUT_DIR}/libffi.a"
|
||||||
|
+
|
||||||
|
+# Copy in the headers
|
||||||
|
+copy_headers () {
|
||||||
|
+ local src=$1
|
||||||
|
+ local dest=$2
|
||||||
|
+
|
||||||
|
+ # Fix non-relative header reference
|
||||||
|
+ sed 's/<ffitarget.h>/"ffitarget.h"/' < "${src}/include/ffi.h" > "${dest}/ffi.h"
|
||||||
|
+ cp "${src}/include/ffitarget.h" "${dest}"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+copy_headers armv6-ios "${OUTPUT_DIR}/include/armv6"
|
||||||
|
+copy_headers armv7-ios "${OUTPUT_DIR}/include/armv7"
|
||||||
|
+copy_headers i386-ios-sim "${OUTPUT_DIR}/include/i386"
|
||||||
|
+
|
||||||
|
+# Create top-level header
|
||||||
|
+(
|
||||||
|
+cat << EOF
|
||||||
|
+#ifdef __arm__
|
||||||
|
+ #include <arm/arch.h>
|
||||||
|
+ #ifdef _ARM_ARCH_6
|
||||||
|
+ #include "include/armv6/ffi.h"
|
||||||
|
+ #elif _ARM_ARCH_7
|
||||||
|
+ #include "include/armv7/ffi.h"
|
||||||
|
+ #endif
|
||||||
|
+#elif defined(__i386__)
|
||||||
|
+ #include "include/i386/ffi.h"
|
||||||
|
+#endif
|
||||||
|
+EOF
|
||||||
|
+) > "${OUTPUT_DIR}/ffi.h"
|
||||||
@@ -20,3 +20,4 @@ irix
|
|||||||
sparc-abi-check
|
sparc-abi-check
|
||||||
remove-debug-code
|
remove-debug-code
|
||||||
ungccify
|
ungccify
|
||||||
|
ios-fixes
|
||||||
|
|||||||
Reference in New Issue
Block a user