gcc and universal binaries

Samuel Halliday sam.halliday at gmail.com
Sat Aug 24 08:08:03 PDT 2013


Thanks Ryan,

Assuming my Mountain Lion can actually build PPC binaries, your solution would appear to want to build universal bins for everything on my system.

Can I specify that I just want the gfortran and its deps to be built universally?

Also, what command line arguments do I use to get universal builds in my own projects?

-- 
Sam

On 24 Aug 2013, at 16:00, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Aug 24, 2013, at 07:29, Samuel Halliday wrote:
> 
>> I'm using the macports distro of gcc in order to get fortran support.
>> 
>> Could somebody please show me how to build universal binaries that work on the four targets: PPC/Intel 32/64?
>> 
>> I presume I'll need to get this fixed:
>> 
>> $ file /opt/local/lib/libgcc/libgfortran.3.dylib 
>> /opt/local/lib/libgcc/libgfortran.3.dylib: Mach-O 64-bit x86_64 dynamically linked shared library
> 
> Edit /opt/local/etc/macports/macports.conf and set universal_archs to x86_64 i386 ppc64 ppc. Then reinstall libgcc with the universal variant. And maybe the gcc port you're using too. If you already had any ports installed using the universal variant they'll have to be rebuilt using the new set of architectures. Not sure if MacPorts will do that for you automatically or not.
> 
> I would expect that modern versions of OS X cannot build for PowerPC anymore, so you'll need to be running as sufficiently old version of OS X. Lion and later are too new. Snow Leopard is probably old enough. Leopard is definitely old enough. Tiger is too old to build 64-bit in some cases.
> 



More information about the macports-users mailing list