[MPlayer-dev-eng] Patch for build failure with clang, lvvm, etc. on Mac OSX > 10.6

Aubin Paul clist at outlyer.org
Fri Mar 29 15:00:19 CET 2013


Submitted this via Bugzilla but not sure if that's the right place anymore:
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2134#c0

Darwin-specific changes to fix compilation on current Mac OS X/Xcode/clang

It is not possible to build Mplayer on Mac OS X > 10.6 due to a few
errors in the build system.  The following changes (all can be
implemented in configure for the darwin/x86_64 target) allow mplayer
to build properly.

1. using -DPIC with YASM to allow ffmpeg to compile properly
2. Using -Wl,-pie to fix linking since -pie -fpie is incorrect under
Darwin's clang
3. --mdynamic-no-pic breaks compilation due to security features in
newer versions of Mac OS X

Clang does support PIC but the configure check breaks due to the
inclusion of -fpie -pie so I added a separate check for clang and
darwin to include the right flags. After that, PIC is successfully
detected and works fine.

Attached a patch which fixes the issue and should not affect any other
platforms.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-clang-fix.diff
Type: application/octet-stream
Size: 739 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130329/03d64cbd/attachment.obj>


More information about the MPlayer-dev-eng mailing list