These are the config scripts for the 'iphone' and 'iphone-simulator' targets platforms. They use lots of new --with options that have been added to the configure script. --- ghc-6.10.4.orig/config-iphone-simulator.sh 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.4/config-iphone-simulator.sh 2010-12-22 10:45:08.000000000 +1300 @@ -0,0 +1,33 @@ +#!/bin/sh +autoconf + +# Make ghc-6.10.4 work on Snow Leopard. +echo 'SRC_HC_OPTS = -opta -m32 -optc -m32 -optl -m32' >> mk/build.mk + +export TARGET_PLATFORM=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk +export TARGET_BIN="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin" +export TARGET_GCC_ROOT="$TARGET_PLATFORM/usr/lib/gcc/i686-apple-darwin10/4.2.1/" + +export TARGET_GCC=$TARGET_BIN/i686-apple-darwin10-gcc-4.2.1 +export TARGET_LD=$TARGET_BIN/ld +export TARGET_AR=$TARGET_BIN/ar +export TARGET_RANLIB=$TARGET_BIN/ranlib +export TARGET_STRIP=$TARGET_BIN/strip + +export TARGET_INCLUDE="$TARGET_GCC_ROOT/include" +export TARGET_CPPFLAGS="-I$TARGET_INCLUDE -I$TARGET_PLATFORM/usr/include/" +export TARGET_CFLAGS="-pipe -no-cpp-precomp -isysroot $TARGET_PLATFORM" +export TARGET_LDFLAGS="-L$TARGET_PLATFORM/usr/lib/" + +./configure --host=i686-apple-darwin10 \ + --with-target-gcc="$TARGET_GCC" \ + --with-target-ar="$TARGET_AR" \ + --with-target-ld="$TARGET_LD" \ + --with-target-ranlib="$TARGET_RANLIB" \ + --with-target-strip="$TARGET_STRIP" \ + --with-target-cppflags="$TARGET_CPPFLAGS" \ + --with-target-cflags="$TARGET_CFLAGS" \ + --with-target-ldflags="$TARGET_LDFLAGS" \ + --with-toolchain-name="iphone-simulator" \ + --prefix="/opt/iphone" + --- ghc-6.10.4.orig/config-iphone.sh 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.4/config-iphone.sh 2010-12-22 10:29:04.000000000 +1300 @@ -0,0 +1,45 @@ +#!/bin/sh +autoconf + +export TARGET_PLATFORM=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk +export TARGET_BIN="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin" +export TARGET_GCC_ROOT="$TARGET_PLATFORM/usr/lib/gcc/arm-apple-darwin10/4.2.1/" + +export TARGET_GCC=$TARGET_BIN/arm-apple-darwin10-gcc-4.2.1 +export TARGET_LD=$TARGET_BIN/ld +export TARGET_AR=$TARGET_BIN/ar +export TARGET_RANLIB=$TARGET_BIN/ranlib +export TARGET_STRIP=$TARGET_BIN/strip + +export TARGET_INCLUDE="$TARGET_GCC_ROOT/include" +export TARGET_CPPFLAGS="-I$TARGET_INCLUDE -I$TARGET_PLATFORM/usr/include/" +export TARGET_CFLAGS="-pipe -no-cpp-precomp -isysroot $TARGET_PLATFORM" +export TARGET_LDFLAGS="-L$TARGET_PLATFORM/usr/lib/" + +# The compiler whose output runs locally and hopefully looks like the real one. +# This is used for hsc2hs. +export LOCAL_PLATFORM=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk +export LOCAL_BIN="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin" +export LOCAL_GCC_ROOT="$LOCAL_PLATFORM/usr/lib/gcc/i686-apple-darwin10/4.2.1/" + +export LOCAL_GCC=$LOCAL_BIN/i686-apple-darwin10-gcc-4.2.1 +export LOCAL_INCLUDE="$LOCAL_GCC_ROOT/include" +export LOCAL_CPPFLAGS="-I$LOCAL_INCLUDE -I$LOCAL_PLATFORM/usr/include/" +export LOCAL_CFLAGS="-pipe -no-cpp-precomp -isysroot $LOCAL_PLATFORM" +export LOCAL_LDFLAGS="-L$LOCAL_PLATFORM/usr/lib/" + +./configure --host=arm-apple-darwin10 \ + --with-target-gcc="$TARGET_GCC" \ + --with-target-ar="$TARGET_AR" \ + --with-target-ld="$TARGET_LD" \ + --with-target-ranlib="$TARGET_RANLIB" \ + --with-target-strip="$TARGET_STRIP" \ + --with-target-cppflags="$TARGET_CPPFLAGS" \ + --with-target-cflags="$TARGET_CFLAGS" \ + --with-target-ldflags="$TARGET_LDFLAGS" \ + --with-local-gcc="$LOCAL_GCC" \ + --with-local-cppflags="$LOCAL_CPPFLAGS" \ + --with-local-cflags="$LOCAL_CFLAGS" \ + --with-local-ldflags="$LOCAL_LDFLAGS" \ + --with-toolchain-name="iphone" \ + --prefix="/opt/iphone"