Re: [Gc] Universal Binary builds on Mac OS X (patch)

Ivan Maidanski ivmai at mail.ru
Thu Feb 18 23:43:42 PST 2010


Bruce Mitchener <bruce.mitchener at gmail.com> wrote:
> Hello all,
> 
> I wanted a Universal build of the Boehm GC on Mac OS X and the attached
> patch appears to do the trick when passing the right flags to configure.
> 
> After applying the attached patch and re-generating configure, you'll want
> to run configure like this:
> 
>     CFLAGS="-arch ppc -arch i386 -arch x86_64" ./configure
> --disable-dependency-tracking
> 
> That gives me a Universal libgc.dylib that passes 'make check'.
> 
> There may be other issues if there are things that are checked at configure
> time rather than compile time that didn't actually break the compile.  I
> didn't notice any obvious breakage though yet.
> 
> I have only tested this on Snow Leopard, as that is all that I have
> available to me.
> 
>  - Bruce

In other words, it is suggested to choose the correct THREAD_FLD definition based on __DARWIN_UNIX03 macro (predefined?) instead of HAS_PPC_THREAD_STATE... macros group (which are set by configure at present).
So, my Q to Darwin/MacOSX folks is: could we use __DARWIN_UNIX03 reliably (including for older Mac OS X versions) for such purpose?

Bye.


More information about the Gc mailing list