[MPlayer-dev-eng] [Q] How to build a universal binary for the Mac OS X?
Chris Roccati
rratboy at pobox.com
Tue Sep 26 20:50:00 CEST 2006
On 26 Sep 2006, at 18:50 , Mohammad A. Haque wrote:
> % cd ../main_ppc and configure/compile using --target=ppc-darwin --
> cc=powerpc-apple-darwin8-gcc-4.0.1 --enable-cross-compile --enable-
> altivec
> % cd ../main_noaltivec and configure/compile usinf --target=ppc-
> darwin --cc=powerpc-apple-darwin8-gcc-4.0.1 --enable-cross-compile
> --disable-altivec
> % cd ../mplayerosx
> % lipo -create ../main_ppc/mplayer ../main_intel/mplayer -output
> External_Binaries/mplayer.app/Contents/MacOS/mplayer
> % cp -a ../main_noaltivec/mplayer_noaltivec External_Binaries/
> mplayer.app/Contents/MacOS/mplayer_noaltivec
> % make dist
The other way around (ppc building for intel) does not seem to work:
to make configure finish you have to force the compiler to use the
universal sdk adding to the CFLAGS -isystem... and -Wl,-isyslibroot -
Wl,...
--target=i686-darwin does not really work, as the configure does not
detect darwin, $_darwin does not get set and no macos libraries
detection happens; after adding the darwin architecture to the
configure script, you need to force the compiler to use sse3 with -
msse3 or the macos api detection will still fail. after that
configure will run (trying and failing to execute some cross compiled
binaries), but make will fail complaing that about something not
being a valid 386 opcode.
More information about the MPlayer-dev-eng
mailing list