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

Xidorn Quan quanxunzhen at gmail.com
Tue Oct 9 06:51:07 CEST 2012


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.

Regards,
Xidorn Quan
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 35235)
+++ configure	(working copy)
@@ -2052,7 +2052,7 @@
 
     echocheck "GCC & CPU optimization abilities"
   if test "$_runtime_cpudetection" = no ; then
-    if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
+    if linux && test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
       cflag_check -march=native && proc=native
     fi
     if test "$proc" = "amdfam10"; then
@@ -2205,7 +2205,7 @@
     echocheck "GCC & CPU optimization abilities"
     # This is a stripped-down version of the i386 fallback.
     if test "$_runtime_cpudetection" = no ; then
-      if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
+      if linux && test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
         cflag_check -march=native && proc=native
       fi
       # --- AMD processors ---


More information about the MPlayer-dev-eng mailing list