aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-09-26 18:08:02 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-09-26 18:08:02 +0000
commit9e1759bfe68e33618bec459677e1d2ab45a3eb76 (patch)
treeb2fb4617d28063a633c60de286a8c2559f8fc417 /toolchain/uClibc
parent657788dc0d40598a8a202b0515177bf535099994 (diff)
downloadupstream-9e1759bfe68e33618bec459677e1d2ab45a3eb76.tar.gz
upstream-9e1759bfe68e33618bec459677e1d2ab45a3eb76.tar.bz2
upstream-9e1759bfe68e33618bec459677e1d2ab45a3eb76.zip
Do not save variables in hi or lo across system calls, fixes issues with gcc-4.4 (#5351)
SVN-Revision: 17742
Diffstat (limited to 'toolchain/uClibc')
-rw-r--r--toolchain/uClibc/patches-0.9.30.1/901-hi_lo_system_calls.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.30.1/901-hi_lo_system_calls.patch b/toolchain/uClibc/patches-0.9.30.1/901-hi_lo_system_calls.patch
new file mode 100644
index 0000000000..6c78130e3f
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.30.1/901-hi_lo_system_calls.patch
@@ -0,0 +1,30 @@
+The kernel does not save these registers across system calls. GCC 4.4
+has gotten more agressive about using them for temporary variables, so
+this shows up as intermittent crashes if you use a recent compiler.
+
+Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
+
+diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h
+index 3639913..28b0f91 100644
+--- a/libc/sysdeps/linux/mips/bits/syscalls.h
++++ b/libc/sysdeps/linux/mips/bits/syscalls.h
+@@ -261,7 +261,7 @@
+ })
+
+ #define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
+- "$14", "$15", "$24", "$25", "memory"
++ "$14", "$15", "$24", "$25", "hi", "lo", "memory"
+
+ #else /* N32 || N64 */
+
+@@ -318,7 +318,7 @@
+ })
+
+ #define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
+- "$14", "$15", "$24", "$25", "memory"
++ "$14", "$15", "$24", "$25", "hi", "lo", "memory"
+
+ #endif
+
+
+--