[cairo] Speeding up _cairo_fixed_from_double

Michael Sweet mike at easysw.com
Thu Oct 26 17:44:36 PDT 2006


Daniel Amelang wrote:
>> > Anyone who's building a fat binary effectively needs to go through a
>> > build twice -- including the full configure stage, once for each arch &
>> > SDK.  If someone has this optimized down to just doing a single build
>> > that builds both at the same time, great, but then making sure this 
>> case
>> > works is on their shoulders.  With a compile-time endian check, cairo
>> > will compile and run correctly when built for either the x86 or the ppc
>> > architecture, and that's all that's required for universal binaries.
>>
>> Building twice sucks, and if you have a configure test you'll need to
>> actually build on two different systems and use lipo to merge the
>> binaries after the fact.
> 
> I still see this as an autotools problem (for those that see it as a
> problem). It appears that what you're proposing is for the
> autotools-build-based projects to all add code into their build
> process to account for building fat binaries. I'm not really sold on
> that idea.

No, I'm proposing that Cairo think twice before incorporating endian-
specific code solely on the basis of an unreliable autoconf test.

> Like you said, the problem is akin (if not one and the same) to
> general cross-compling with autotools. It's a problem that's already
> been solved using the toolset rather than getting the library
> developers to special case their build process.

Library developers already have to do things differently to support
cross-compiling...

> My opinion aside...along the line of what you're looking for (getting
> autotools to manage building fat binaries), this fellow seems to have
> an interesting patch to achieve that:
> 
> http://ascarter.wordpress.com/2006/05/18/sqlite-universal-binary/

That is essentially how a developer would do it with the standard
Cairo package (you can just add "-arch i386 -arch ppc" to build
Universal on an Intel system).  The issue is that Intel and PPC have
different endianess, but a configure-time check will only pick up the
word order on the machine you are compiling on...

*If* Cairo starts using endian-specific code, I'm just asking that
a few short conditional directives be added so that Mac OS X, a
fairly popular platform, could be supported out of the box.  I say
this not because native Mac OS X developers will want it (they won't
since they have Quartz and Cocoa), but because GTK+ developers will
want it so that they won't need to run their apps through X11...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com


More information about the cairo mailing list