[vlc-devel] [PATCH] MIPS: enable HAVE_FPU on hard-float builds.

Konstantin Pavlov thresh at videolan.org
Sun Dec 16 11:45:03 CET 2012


---
 contrib/src/main.mak |    4 ++++
 include/vlc_cpu.h    |    5 +++++
 2 files changed, 9 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index fc7b877..85cd306 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -45,6 +45,10 @@ ifeq ($(call cppcheck, __SOFTFP__),)
 HAVE_FPU = 1
 endif
 endif
+else ifneq ($(findstring $(ARCH),mipsel),)
+ifneq ($(call cppcheck, __mips_hard_float)),)
+HAVE_FPU = 1
+endif
 endif
 ifeq ($(ARCH)-$(HAVE_WIN32),x86_64-1)
 HAVE_WIN64 := 1
diff --git a/include/vlc_cpu.h b/include/vlc_cpu.h
index aefb508..1fa70c5 100644
--- a/include/vlc_cpu.h
+++ b/include/vlc_cpu.h
@@ -179,6 +179,11 @@ VLC_API unsigned vlc_CPU(void);
 # elif defined (__sparc__)
 #  define HAVE_FPU 1
 
+# elif defined (__mips__)
+# if defined(__mips_hard_float)
+#   define HAVE_FPU 1
+#endif
+
 # else
 /**
  * Are single precision floating point operations "fast"?
-- 
1.7.10.4




More information about the vlc-devel mailing list