Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > defe9e2850108867aa0567268744d1a3 > files > 17

xulrunner-6.0-1.3.mga1.src.rpm

Avoid to shoot ourselves in the foot

Asking the compiler if he knows neon (and forcing it to understand neon
with -mfpu=neon -mfloat-abi=softfloat) doesn't mean that the target cpu
has neon, so check for target cpu first. if it's not armv7, no neon.

Index: mozilla-central/gfx/ycbcr/Makefile.in
===================================================================
--- mozilla-central.orig/gfx/ycbcr/Makefile.in
+++ mozilla-central/gfx/ycbcr/Makefile.in
@@ -74,7 +74,7 @@ endif # SunOS
 endif # linux
 endif # windows
 
-ifeq (arm,$(findstring arm,$(OS_TEST)))
+ifeq (1,$(HAVE_ARM_NEON))
 CPPSRCS += yuv_convert_arm.cpp \
            $(NULL)
 endif
Index: mozilla-central/configure.in
===================================================================
--- mozilla-central.orig/configure.in
+++ mozilla-central/configure.in
@@ -3595,6 +3595,8 @@ fi
 AC_SUBST(HAVE_ARM_SIMD)
 
 AC_MSG_CHECKING(for ARM NEON support in compiler)
+case "${target_cpu}" in
+armv7*)
 _SAVE_CFLAGS="$CFLAGS"
 if test "$GNU_CC"; then
   # gcc needs -mfpu=neon to recognize NEON instructions
@@ -3609,6 +3611,11 @@ if test "$result" = "yes"; then
     HAVE_ARM_NEON=1
 fi
 CFLAGS="$_SAVE_CFLAGS"
+;;
+*)
+AC_MSG_RESULT("no")
+;;
+esac
 AC_SUBST(HAVE_ARM_NEON)
 
 dnl ========================================================
Index: mozilla-central/js/src/configure.in
===================================================================
--- mozilla-central.orig/js/src/configure.in
+++ mozilla-central/js/src/configure.in
@@ -3535,6 +3535,8 @@ fi
 AC_SUBST(HAVE_ARM_SIMD)
 
 AC_MSG_CHECKING(for ARM NEON support in compiler)
+case "${target_cpu}" in
+armv7*)
 _SAVE_CFLAGS="$CFLAGS"
 if test "$GNU_CC"; then
   # gcc needs -mfpu=neon to recognize NEON instructions
@@ -3549,6 +3551,11 @@ if test "$result" = "yes"; then
     HAVE_ARM_NEON=1
 fi
 CFLAGS="$_SAVE_CFLAGS"
+;;
+*)
+AC_MSG_RESULT("no")
+;;
+esac
 AC_SUBST(HAVE_ARM_NEON)
 
 dnl ========================================================