summaryrefslogtreecommitdiff
path: root/sdk/recipes/patches/spidermonkey
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-12-10 19:35:12 +0000
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-12-10 19:35:12 +0000
commit9f96f97dcfacbed41ce1425072def3880f7d9a77 (patch)
treeb19b43afd8af8a5b098424b7866a96be6f544d4a /sdk/recipes/patches/spidermonkey
parent9942970edd9be6aa4ccd908b94fa0d2c81c3f863 (diff)
downloadtoolchains-9f96f97dcfacbed41ce1425072def3880f7d9a77.tar.gz
toolchains-9f96f97dcfacbed41ce1425072def3880f7d9a77.tar.bz2
fix compiling without interworking
Diffstat (limited to 'sdk/recipes/patches/spidermonkey')
-rw-r--r--sdk/recipes/patches/spidermonkey/arm-unknown-riscos/MethodJIT.p66
-rw-r--r--sdk/recipes/patches/spidermonkey/arm-unknown-riscos/configure.p17
2 files changed, 83 insertions, 0 deletions
diff --git a/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/MethodJIT.p b/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/MethodJIT.p
new file mode 100644
index 0000000..9236477
--- /dev/null
+++ b/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/MethodJIT.p
@@ -0,0 +1,66 @@
+--- js/src/methodjit/MethodJIT.cpp 2012-12-10 19:03:08.000000000 +0000
++++ js/src/methodjit/MethodJIT.cpp 2012-12-10 19:04:11.000000000 +0000
+@@ -433,7 +433,7 @@
+ "ldr r1, [r11, #24]" "\n" /* fp->rval data */
+ "ldr r2, [r11, #28]" "\n" /* fp->rval type */
+ "ldr r11, [sp, #28]" "\n" /* load f.fp */
+- "bx lr" "\n"
++ "mov pc, lr" "\n"
+ );
+
+ asm volatile (
+@@ -487,12 +487,12 @@
+ " mov r11, r1" "\n"
+
+ " mov r0, sp" "\n"
+-" blx " SYMBOL_STRING_VMFRAME(SetVMFrameRegs) "\n"
++" bl " SYMBOL_STRING_VMFRAME(SetVMFrameRegs) "\n"
+ " mov r0, sp" "\n"
+-" blx " SYMBOL_STRING_VMFRAME(PushActiveVMFrame)"\n"
++" bl " SYMBOL_STRING_VMFRAME(PushActiveVMFrame)"\n"
+
+ /* Call the compiled JavaScript function. */
+-" bx r4" "\n"
++" mov pc, r4" "\n"
+ );
+
+ asm volatile (
+@@ -505,7 +505,7 @@
+
+ /* Tidy up. */
+ " mov r0, sp" "\n"
+-" blx " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
++" bl " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
+
+ /* Skip past the parameters we pushed (such as cx and the like). */
+ " add sp, sp, #(4*7 + 4*4)" "\n"
+@@ -524,17 +524,17 @@
+ " mov r0, sp" "\n"
+
+ /* Call the utility function that sets up the internal throw routine. */
+-" blx " SYMBOL_STRING_RELOC(js_InternalThrow) "\n"
++" bl " SYMBOL_STRING_RELOC(js_InternalThrow) "\n"
+
+ /* If js_InternalThrow found a scripted handler, jump to it. Otherwise, tidy
+ * up and return. */
+ " cmp r0, #0" "\n"
+ " it ne" "\n"
+-" bxne r0" "\n"
++" movne pc, r0" "\n"
+
+ /* Tidy up, then return '0' to represent an unhandled exception. */
+ " mov r0, sp" "\n"
+-" blx " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
++" bl " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
+ " add sp, sp, #(4*7 + 4*4)" "\n"
+ " mov r0, #0" "\n"
+ " pop {r4-r11,pc}" "\n"
+@@ -551,7 +551,7 @@
+ * The arguments are identical to those for js_* except that the target function should be in
+ * 'ip'. */
+ " push {ip,lr}" "\n"
+-" blx ip" "\n"
++" bl ip" "\n"
+ " pop {ip,pc}" "\n"
+ );
+
diff --git a/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/configure.p b/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/configure.p
index 0dd914b..fcd012a 100644
--- a/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/configure.p
+++ b/sdk/recipes/patches/spidermonkey/arm-unknown-riscos/configure.p
@@ -11,3 +11,20 @@
*-android*)
cat >> confdefs.h <<\EOF
#define NO_PW_GECOS 1
+@@ -13341,6 +13341,16 @@
+ { echo "configure: error: --with-cpu-arch=armv7 is not supported for non-ARM CPU architectures" 1>&2; exit 1; }
+ ;;
+ esac
++elif test "$MOZ_ARM_ARCH" = "armv3"; then
++ case "$target_cpu" in
++ arm*)
++ if test "$GNU_CC"; then
++ CFLAGS="$CFLAGS -march=armv3 -mno-thumb-interwork -msoft-float"
++ CXXFLAGS="$CXXFLAGS -march=armv3 -mno-thumb-interwork -msoft-float"
++ ASFLAGS="$ASFLAGS -march=armv3 -mno-thumb-interwork -msoft-float"
++ fi
++ ;;
++ esac
+ else
+ case "$target_cpu" in
+ arm*)