[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool is "unfatting" my universal binaries

From: Brian
Subject: Re: Libtool is "unfatting" my universal binaries
Date: Mon, 8 Oct 2007 18:38:11 -0600

Peter, thanks for your comments. I build libtool from source, and am using 1.5.24. I manually ran the large link command, inserting `-arch i386 -arch ppc' after g++, and  it did create a universal library:

But it's not clear to me what I need to do to get libtool to do this on its own, and also why it's not doing it. I modified CC/CXX in the Makefile to also pass  the arch flags at that point, and the only difference is that when libtool is called, it gets them twice, and it proceeds to strip them out of the command twice!

On 10/8/07, Peter O'Gorman <address@hidden> wrote:

On Oct 9, 2007, at 1:02 AM, Peter O'Gorman wrote:

> On Oct 7, 2007, at 5:07 AM, Brian wrote:
>> I am trying to make a universal binary out of our software on OSX.
>> The general strategy is to configure with LDFLAGS/CXXFLAGS="-arch
>> i386 -arch ppc". This seems to work for our convenience libraries,
>> which become fat, but when it comes time to make one of our
>> distribution libraries, libtemt, libtool recognizes the
>> convenience libs are fat and "unfats" them!
>> I produced a log:
>> I assume I am doing something wrong, although I know that libtool
>> is unaware of mac universal binaries. Does anyone have suggestions
>> for getting my libs to be i386/ppc, without resorting to building
>> on the actual hardware for each and lipo'ing them together?
>> Thanks and cheers,
> Libtool is well aware of universal archives. ar x does not work
> with universal archives, so libtool uses lipo(1) to extract the
> objects for each architecture and put them back together again.
> This is because Mac OS X has no equivalent for GNU ld's --whole-
> archive flag. What is the problem, I do not see a failure in your log.

Ah, I see, the -arch flags are being stripped. Update to a newer
version of GNU libtool (1.5.22 should do), or put the -arch flags in
the CC and CXX environment vars (e.g. ./configure CC='gcc -arch ppc -
arch i386').

Peter O'Gorman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]