public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-lang/spidermonkey/files: spidermonkey-1.8.5-arm_respect_cflags-2.patch spidermonkey-1.8.5-arm_resprect_cflags-1.patch
@ 2012-11-02 19:46 Ian Stakenvicius (axs)
  0 siblings, 0 replies; only message in thread
From: Ian Stakenvicius (axs) @ 2012-11-02 19:46 UTC (permalink / raw
  To: gentoo-commits

axs         12/11/02 19:46:40

  Added:                spidermonkey-1.8.5-arm_respect_cflags-2.patch
  Removed:              spidermonkey-1.8.5-arm_resprect_cflags-1.patch
  Log:
  honour arm cflags and properly autodetect thumb2 support in 1.8.5 for gentoo (bug 420471)
  
  (Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)

Revision  Changes    Path
1.1                  dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch?rev=1.1&content-type=text/plain

Index: spidermonkey-1.8.5-arm_respect_cflags-2.patch
===================================================================
--- a/js-1.8.5/js/src/configure.in	2011-03-31 15:08:36.000000000 -0400
+++ b/js-1.8.5/js/src/configure.in	2012-11-02 15:32:38.000000000 -0400
@@ -3550,7 +3550,7 @@
 _SAVE_CFLAGS="$CFLAGS"
 if test "$GNU_CC"; then
   # gcc needs -mfpu=neon to recognize NEON instructions
-  CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
+  CFLAGS="$CFLAGS -mfpu=neon"
 fi
 AC_TRY_COMPILE([],
                [asm("vadd.i8 d0, d0, d0");],
@@ -4654,12 +4654,6 @@
 dnl ========================================================
 MOZ_ARG_HEADER(Individual module options)
 
-dnl Setup default CPU arch for arm target
-case "$target_cpu" in
-  arm*)
-    MOZ_ARM_ARCH=armv7
-  ;;
-esac
 dnl ========================================================
 dnl = Enable building the Thumb2 instruction set
 dnl ========================================================
@@ -4668,66 +4662,35 @@
     MOZ_THUMB2=1,
     MOZ_THUMB2=)
 if test -n "$MOZ_THUMB2"; then
-  MOZ_ARM_ARCH=armv7
+    AC_MSG_WARN([thumb2 enabled instead of autodetected -- hope you know what you are doing])
+else
+    AC_MSG_CHECKING([for thumb2 support in arm architecture])
+    AC_LANG_SAVE
+    AC_LANG_C
+    AC_TRY_LINK([int ac_test(int i) { return i; }],[asm(".syntax unified\n.thumb\nb.w ac_test\n.arm"); if (ac_test(1)) return 1;],
+      [MOZ_THUMB2=1
+        AC_MSG_RESULT([yes])],
+      [MOZ_THUMB2=
+        AC_MSG_RESULT([no])])
+    AC_LANG_RESTORE
 fi
 
 dnl ========================================================
 dnl = Enable building for ARM specific CPU features
 dnl ========================================================
-MOZ_ARG_WITH_STRING(cpu-arch,
-[  --with-cpu-arch=arch      Use specific arm architecture CPU features, default armv7],
-    MOZ_ARM_ARCH=$withval)
-
 if test -n "$MOZ_THUMB2"; then
   case "$target_cpu" in
     arm*)
-      if test "$MOZ_ARM_ARCH" != "armv7"; then
-        AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
-      fi
       if test "$GNU_CC"; then
         AC_DEFINE(MOZ_THUMB2)
-        AC_DEFINE(MOZ_ARM_ARCH)
-        CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
-        CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
-        ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
       else
         AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
       fi
     ;;
-    *)
-      AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
-    ;;
-  esac
-elif test "$MOZ_ARM_ARCH" = "armv7"; then
-  case "$target_cpu" in
-    arm*)
-      if test "$GNU_CC"; then
-        AC_DEFINE(MOZ_ARM_ARCH)
-        CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
-        CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
-        ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
-      else
-        AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
-      fi
-    ;;
-    *)
-      AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
-    ;;
-  esac
-else
-  case "$target_cpu" in
-    arm*)
-      if test "$GNU_CC"; then
-        CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
-        CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
-        ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
-      fi
-      ;;
   esac
 fi
 
 AC_SUBST(MOZ_THUMB2)
-AC_SUBST(MOZ_ARM_ARCH)
 
 dnl ========================================================
 dnl =





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-02 19:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 19:46 [gentoo-commits] gentoo-x86 commit in dev-lang/spidermonkey/files: spidermonkey-1.8.5-arm_respect_cflags-2.patch spidermonkey-1.8.5-arm_resprect_cflags-1.patch Ian Stakenvicius (axs)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox