Gentoo Archives: gentoo-commits

From: "Ian Stakenvicius (axs)" <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [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
Date: Fri, 02 Nov 2012 19:46:57
Message-Id: 20121102194641.1119C21601@flycatcher.gentoo.org
1 axs 12/11/02 19:46:40
2
3 Added: spidermonkey-1.8.5-arm_respect_cflags-2.patch
4 Removed: spidermonkey-1.8.5-arm_resprect_cflags-1.patch
5 Log:
6 honour arm cflags and properly autodetect thumb2 support in 1.8.5 for gentoo (bug 420471)
7
8 (Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
9
10 Revision Changes Path
11 1.1 dev-lang/spidermonkey/files/spidermonkey-1.8.5-arm_respect_cflags-2.patch
12
13 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
14 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
15
16 Index: spidermonkey-1.8.5-arm_respect_cflags-2.patch
17 ===================================================================
18 --- a/js-1.8.5/js/src/configure.in 2011-03-31 15:08:36.000000000 -0400
19 +++ b/js-1.8.5/js/src/configure.in 2012-11-02 15:32:38.000000000 -0400
20 @@ -3550,7 +3550,7 @@
21 _SAVE_CFLAGS="$CFLAGS"
22 if test "$GNU_CC"; then
23 # gcc needs -mfpu=neon to recognize NEON instructions
24 - CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
25 + CFLAGS="$CFLAGS -mfpu=neon"
26 fi
27 AC_TRY_COMPILE([],
28 [asm("vadd.i8 d0, d0, d0");],
29 @@ -4654,12 +4654,6 @@
30 dnl ========================================================
31 MOZ_ARG_HEADER(Individual module options)
32
33 -dnl Setup default CPU arch for arm target
34 -case "$target_cpu" in
35 - arm*)
36 - MOZ_ARM_ARCH=armv7
37 - ;;
38 -esac
39 dnl ========================================================
40 dnl = Enable building the Thumb2 instruction set
41 dnl ========================================================
42 @@ -4668,66 +4662,35 @@
43 MOZ_THUMB2=1,
44 MOZ_THUMB2=)
45 if test -n "$MOZ_THUMB2"; then
46 - MOZ_ARM_ARCH=armv7
47 + AC_MSG_WARN([thumb2 enabled instead of autodetected -- hope you know what you are doing])
48 +else
49 + AC_MSG_CHECKING([for thumb2 support in arm architecture])
50 + AC_LANG_SAVE
51 + AC_LANG_C
52 + 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;],
53 + [MOZ_THUMB2=1
54 + AC_MSG_RESULT([yes])],
55 + [MOZ_THUMB2=
56 + AC_MSG_RESULT([no])])
57 + AC_LANG_RESTORE
58 fi
59
60 dnl ========================================================
61 dnl = Enable building for ARM specific CPU features
62 dnl ========================================================
63 -MOZ_ARG_WITH_STRING(cpu-arch,
64 -[ --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7],
65 - MOZ_ARM_ARCH=$withval)
66 -
67 if test -n "$MOZ_THUMB2"; then
68 case "$target_cpu" in
69 arm*)
70 - if test "$MOZ_ARM_ARCH" != "armv7"; then
71 - AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
72 - fi
73 if test "$GNU_CC"; then
74 AC_DEFINE(MOZ_THUMB2)
75 - AC_DEFINE(MOZ_ARM_ARCH)
76 - CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
77 - CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
78 - ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
79 else
80 AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
81 fi
82 ;;
83 - *)
84 - AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
85 - ;;
86 - esac
87 -elif test "$MOZ_ARM_ARCH" = "armv7"; then
88 - case "$target_cpu" in
89 - arm*)
90 - if test "$GNU_CC"; then
91 - AC_DEFINE(MOZ_ARM_ARCH)
92 - CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
93 - CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
94 - ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
95 - else
96 - AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
97 - fi
98 - ;;
99 - *)
100 - AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
101 - ;;
102 - esac
103 -else
104 - case "$target_cpu" in
105 - arm*)
106 - if test "$GNU_CC"; then
107 - CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
108 - CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
109 - ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
110 - fi
111 - ;;
112 esac
113 fi
114
115 AC_SUBST(MOZ_THUMB2)
116 -AC_SUBST(MOZ_ARM_ARCH)
117
118 dnl ========================================================
119 dnl =