[antlr-interest] Building the C runtime as a Universal Binary
Wincent Colaiuta
win at wincent.com
Tue Oct 30 11:14:43 PDT 2007
El 30/10/2007, a las 17:51, Jim Idle escribió:
> I had configure initially build universal binaries, but then they
> did not
> seem that useful.
Well, if you have to ship a product to customers running Mac OS X then
they're incredibly useful, because they allow your product to run on
either Intel or PowerPC hardware with no intervention required from
the user. All shipping Apple machines nowadays have Intel processors,
but there are still millions of users out there still on the PowerPC
platform, and both groups are accustomed to being able to download a
universal binary and run it on either architecture.
> Configure is a bit of a nightmare in that it makes
> assumptions about C related flags that are not always good. I
> believe that
> my scripts may interfere with CFLAGS from the environment as they
> stand, but
> you should be able to work out what to do by looking at the automake
> source
> scripts I should think.
I'll take a look.
> However, generally I would say that it is better to
> build for the target to be honest.
In this case, luckily, I don't actually need to ship the built product
to customers, so this isn't a deal breaker (this is a server-side
build-from-source thing anyway).
The reason why I looked into this is that Leopard just shipped and
some things which didn't use to be universal now are, and when you try
to link to the ANTLR runtime this now fails unless you do some special
architecture-specific setup beforehand. So I have a functioning
workaround already, but I wanted to explore the universal binary angle
as an alternative.
No big deal, though, because like I said I already have a workaround.
Short of hacking the configure to allow cross-compilation it seems the
only way to a proper universal binary build of the runtime is to build
it twice on two different machines, then "lipo" the two products into
a single file, and that's just not practical.
Cheers,
Wincent
More information about the antlr-interest
mailing list