[MPlayer-dev-eng] [PATCH] fix compiling in non-linux system

Xidorn Quan quanxunzhen at gmail.com
Tue Oct 9 08:10:40 CEST 2012


On Tue, Oct 9, 2012 at 1:44 PM, Bernd Ernesti <
mplayer-dev-eng at lists.veego.de> wrote:

> On Tue, Oct 09, 2012 at 12:51:07PM +0800, Xidorn Quan wrote:
> > Hi,
> >
> > According to man page of gcc, value native for -march and -mtune is
> > only supported on Linux at present. Using this value causes compiler
> > generates unrecongized instructions on OS X.
>
> You should better check why your clang is not detected instead of adding
> this broken patch.
>
> Bernd
>
> P.S. Your man page is wrong.
>

Clang doesn't support value "native" at all. I manually set argument
--cc=gcc-4.7 for configure, then make, it reported something like:

> {standard input}:172:no such instruction: `vcvtsi2sd (%rdx), %xmm1,%xmm1'

My man page is wrong? You can check source of man page of gcc directly
here: http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/invoke.texi
check line 10968 which says:
> @option{-mcpu=native} causes the compiler to auto-detect the CPU
> of the build computer.  At present, this feature is only supported on
> Linux, and not all architectures are recognized.
and line 10991 which says:
> @option{-mtune=native} causes the compiler to auto-detect the CPU
> of the build computer.  At present, this feature is only supported on
> Linux, and not all architectures are recognized.


More information about the MPlayer-dev-eng mailing list