[gambit-list] A couple of random questions

Adam King akingcoder at gmail.com
Sun Jul 31 21:26:24 EDT 2011

On Sun, Jul 31, 2011 at 8:42 PM, Raffael Cavallaro <raffaelcavallaro at mac.com
> wrote:

> Adam,
> maybe you could email your scripts to Marc and he could incorporate them
> into the the gambit releases since you seem to be having more consistent
> success at getting it to build for all platforms under Xcode.

I've copied each script below.  It actually doesn't need to be two scripts
for each platform afterall - I've just updated them (and rebuilt all) with
the scripts below under the latest beta of Xcode 4.2 and ran each with my
code without issue.  However, my setup is probably unique to me but may be
of use.  I place the primary OSX build under /usr/local/Gambit-C and then
the two iOS builds are installed under /usr/local/Gambit-C/iPhoneOS and
/usr/local/Gambit-C/iPhoneSimulator - and I've setup Xcode to pick the
correct -lgambc to link based on the current target.  The 3 scripts are:


export CC='clang'
export CXX='clang++'

./configure --prefix=/usr/local/Gambit-C
CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure
--prefix=/usr/local/Gambit-C --enable-single-host --host=i386
sudo make install



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


export PATH="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH"
export CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang
-arch armv7 -isysroot
export CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++
-arch armv7 -isysroot

CFLAGS="-arch armv7" LDFLAGS="-arch armv7" ./configure --host=arm
CFLAGS="-arch armv7" LDFLAGS="-arch armv7" make
sudo make install

Note:  I have compiled both iPhoneOS and iPhoneSim with
'--enable-single-host' in the past, but as it takes a couple of _hours_ to
compile with that option, I don't both for those two.  But I do for the osx
as that's what I use for compiling the scm source to C that get's
compiled/linked in the iOS builds.  Hope this helps!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110731/3f132d4c/attachment.htm>

More information about the Gambit-list mailing list