On Jul 31, 2011, at 8:26 PM, Adam King wrote:
iPhoneSimulator:
export CC='/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk' export CXX='/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk'
CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --prefix=/usr/local/Gambit-C/iPhoneSimulator --host=i386 CFLAGS="-arch i386" LDFLAGS="-arch i386" make sudo make install
iPhoneOS:
export PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH" export CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" export CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
CFLAGS="-arch armv7" LDFLAGS="-arch armv7" ./configure --host=arm --prefix=/usr/local/Gambit-C/iPhoneOS CFLAGS="-arch armv7" LDFLAGS="-arch armv7" make sudo make install
On my system the simulator build appears to work; the iPhoneOS build does not. Warnings and error messages include:
configure: WARNING: If you wanted to set the --build type, don't use --host.
configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "Gambit-C" | #define PACKAGE_TARNAME "gambc-v4_6_1" | #define PACKAGE_VERSION "v4.6.1" | #define PACKAGE_STRING "Gambit-C v4.6.1" | #define PACKAGE_BUGREPORT "gambit@iro.umontreal.ca" | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include <stdio.h> | int | main () | { | FILE *f = fopen ("conftest.out", "w"); | return ferror (f) || fclose (f) != 0; | | ; | return 0; | } configure: error: C compiler cannot create executables
OS5.0.sdk -V >&5 clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files
ld: library not found for -lcrt1.10.6.o