On Tue, 15 Sep 2009, Bobby Powers wrote:
This patch cleans up the -march=i686 from src/Makefile.am, setting it in configure.ac if we're not on a 64-bit system. It also adds --enable-optimized and --disable-debug to the configure script, giving slightly more control over CFLAGS (and if you set CFLAGS as part of the configure arguments it overrides all these settings. I had a bit more work to split the headers off into their own directory, but I need to clean up the patchset.
It applies with: patch -p1 <path/to/patch
Let me know how it looks, in particular the detection of 64-bit is a bit hackish.
Hi Bobby-- I've actually now received three different patches, each with a slightly different take on the -march problem/solution. I'll take a look at merging the best elements from each and try to get something in the libdispatch tree in the next day or two. Part of the general problem here is that what we really want to know is "what additional flags are required to use gcc built-in atomic operations", and at least in my experimentation so far it appears that gcc generates a link, rather than compile, error if they're unsupported, as it simply puts in a dependency on symbols to provide the atomic operations if it can't deal. Abstracting that nicely proves tricky, so we'll be stuck with some or another hackish solution regardless :-). Thanks! Robert N M Watson Computer Laboratory University of Cambridge