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

Bruce Mitchener bruce.mitchener at gmail.com
Fri Feb 19 00:26:48 PST 2010


That was the fix to make building a Universal binary work, yes.

It *appears* that using __DARWIN_UNIX03 is a pretty standard / common way to
handle the changes with the underscore prefixes.  At least, similar code
(for different structs) is in place in many other codebases.

It also looks like the doc/README.darwin is pretty old and may be in need of
some updating?

 - Bruce

2010/2/19 Ivan Maidanski <ivmai at mail.ru>

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20100219/909d0a20/attachment.htm


More information about the Gc mailing list