Building for both i386 and ppc on Intel Mac

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

 



On 30.01.2009, at 18:53, Ruud Klaver wrote:

> Hi Alexei,
>
> On 30 Jan 2009, at 01:45, Alexei Kuznetsov wrote:
>
>> On Tue, Jan 27, 2009 at 12:14 PM, Ruud Klaver <ruud at ag- 
>> projects.com> wrote:
>>> This is what I've been doing to make a universal binary on i386 OS  
>>> X:
>>>
>>> CFLAGS="-arch ppc -arch i386" ./configure
>>> make
>>>
>>> Could you confirm that this works on PPC? Or do you want to  
>>> compile for 1
>>> specific architecture only?
>>
>> Unfortunately, I can confirm some problems with such build. One of  
>> the
>> users that has a PPC Mac could not register on the server because of
>> auth failure. So coudn't I running that build on an Intel Mac with
>> Rosetta.
>>
>> Alexei
>
> That's interesting, because I heard the same report from someone else.
>
> Were you successful in building a PPC binary when cross-compiling,  
> and if so, could it actually register?
>
> Ruud Klaver
> AG Projects

Not exactly. I've cross-compiled ppc binaries that were able to  
register. But the user complained that sound was distorted inspite of  
the fact that it was good on my Intel Mac in Rosetta emulation. And  
when he builds pjproject natively, everything is fine.

That distorted sound build had been made by me with the following steps.

$ ln -s /usr/bin/powerpc-apple-darwin9-gcc-4.0.1 /usr/bin/powerpc- 
apple-darwin9-gcc
$ ln -s /usr/bin/ar /usr/bin/powerpc-apple-darwin9-ar
$ ln -s /usr/bin/ranlib /usr/bin/powerpc-apple-darwin9-ranlib

$ ./configure --host=powerpc-apple-darwin9 --build=powerpc

Edit build/rules.mak. Change one line:
-	$(RANLIB) $(LIB)
+	$(RANLIB) -o $(LIB) $(OBJS)

$ make dep
$ make

Maybe this is some byte-ordering problem, since PowerPC is big-endian  
and i386 is little-endian? Or maybe I'm cross-compiling it incorrectly?

Alexei



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux