[MPlayer-dev-eng] [PATCH] Fix MPlayer to compile on Darwin/x86_86
Diego Biurrun
diego at biurrun.de
Tue Jun 2 11:42:12 CEST 2009
On Tue, Jun 02, 2009 at 11:35:17AM +0200, Guillaume Poirier wrote:
>
> Le 2 juin 09 à 11:31, Guillaume POIRIER a écrit :
>
> >With the attached patch and the following configure flags:
>
> That patch. :-P
>
> --- mangle.h (revision 29339)
> +++ mangle.h (working copy)
> @@ -31,6 +31,14 @@
>
> -#define MANGLE(a) EXTERN_PREFIX #a
> +/* Use rip-relative addressing if compiling PIC code (or code for Darwin)
> + on x86-64. */
> +#if ARCH_X86_64 && (defined(PIC) || defined(__APPLE__))
> +# define LOCAL_MANGLE(a) #a "(%%rip)"
> +#else
> +# define LOCAL_MANGLE(a) #a
> +#endif
>
> +#define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
This looks as though the code was copied from libavutil...
> --- libavutil/internal.h (revision 19072)
> +++ libavutil/internal.h (working copy)
> @@ -103,7 +103,7 @@
>
> // Use rip-relative addressing if compiling PIC code on x86-64.
> -#if ARCH_X86_64 && defined(PIC)
> +#if ARCH_X86_64 && (defined(PIC) || defined(__APPLE__))
> # define LOCAL_MANGLE(a) #a "(%%rip)"
> #else
> # define LOCAL_MANGLE(a) #a
You will have to come up with a configure test for this. Under no
circumstances can we allow a __APPLE__ check in there.
Diego
More information about the MPlayer-dev-eng
mailing list