plans for 64bit support

Joshua Root josh+macports at root.id.au
Tue Dec 18 21:46:07 PST 2007


Ryan Schmidt wrote:
> We could introduce a new automatic variant... +universal4?  
> +universal64? People could test with this new variant and if any  
> problems are encountered it would not prevent anyone from using the  
> existing 2-way 32-bit +universal variant. I'm wary of this though...  
> I wouldn't want, say, "universal64" directives to start appearing in  
> portfiles, if we want to eventually fold +universal64 into +universal.

I've been considering this, and my current thoughts are:

The default should be to build 32-bit binaries on ppc64 machines, since
ppc64 code is generally slower. There should be a config file option so
those on ppc64 hardware can build everything 64-bit if they want. On
x86_64 machines, 64-bit binaries should be the default.

+universal should default to building for ppc32, x86, and x86_64. That
will generally give the best performance everywhere.

But then of course you need a way to specify to build for ppc64. For
universal builds, perhaps an extra variant could be added, e.g.
'+universal +ppc64' would build 4-way binaries. Or alternatively, a
different universal variant like the aforementioned '+universal4'.

There's also a related problem: not all ports will necessarily build
correctly for all architectures. Switching to building everything 64-bit
right now is a gamble. So before MacPorts starts building any 64-bit
code by default, there would need to be an effort to make sure that as
many ports as possible are 64-bit clean. After the switch, there would
also need to be a portfile flag that indicates that the port is not
64-bit clean. Ideally the presence of that flag would simply disable the
64-bit architectures when doing a universal build.

Cheers,
Josh


More information about the macports-users mailing list