[CCC DEV] compiling KRoC on Snow Leopard

cljacobsen at gmail.com cljacobsen at gmail.com
Fri Oct 8 13:42:33 BST 2010


Compiling KRoC on Snow Leopard (SL) has not worked for a while now, as
the SL compiler defaults to generating x86_64 binaries. This is a pain
as I am now running SL and I need to build some new Transterpreter
releases. Consequently I sat down to fix it, initially hacking around
to figure out where the problems lie.

Attached to this mail is a patch that builds KRoC (ccsp + tvm) on Snow
Leopard and I have also tested it on my AMD x86_64 machine where it
also still builds. There are no huge changes so this is no real
surprise! The question is whether I commit this, or whether we sit
down and think a bit more about how the various tools should deal with
generating code for different targets than the host architecture they
are running on (or compiled on) when different flags need passing to
the underlying tools. Another thing that might be nice is if the
configure script could pass the right flags for 32 or 64 bit compile
depending on what the user wants, or in the current case for Snow
Leopard at least, always pass 32 bit flags until such a time that 64
bit works.

There are some general things that making the patch has highlighted
that would need to be addressed for a 'proper' fix:

* tranx86's Makefile sets CFLAGS, it should not mess with CFLAGS as
per Automake documentation. AM_CFLAGS could be used, but the flags set
are pretty much what would be set anyway, so it should just be removed
so that externally passed CFLAGS work

* If host specific flags (such as -arch i386) need to be set from
configure script, a bunch of changes will need to be made in all
configure.ac/automake.am scripts for the tools.

* None of the tools (tranx86, occbuild, kroc) really seem to know how
to pass target specific flags to the tools they might execute. This
would need addressing and, possibly, be set by configure.ac

So, should we fix it properly or commit this stopgap solution?

Cheers,
  Christian


ps the tests in occbench take an extraordinary time to execute using
the tvm, should they really be executed by 'make check'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snow_leopard.patch
Type: application/octet-stream
Size: 5503 bytes
Desc: not available
URL: <http://www.concurrency.cc/pipermail/developers/attachments/20101008/7b3fbdd4/attachment.obj>


More information about the developers mailing list