summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/gecko-sdk/files/mozilla-stackgrowth.patch')
-rw-r--r--net-libs/gecko-sdk/files/mozilla-stackgrowth.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/net-libs/gecko-sdk/files/mozilla-stackgrowth.patch b/net-libs/gecko-sdk/files/mozilla-stackgrowth.patch
new file mode 100644
index 000000000000..af226b28ed9c
--- /dev/null
+++ b/net-libs/gecko-sdk/files/mozilla-stackgrowth.patch
@@ -0,0 +1,37 @@
+--- js/src/jscpucfg.c 15 Nov 2003 00:10:56 -0000 3.21
++++ js/src/jscpucfg.c 22 Oct 2004 05:45:36 -0000
+@@ -153,19 +153,34 @@ static int Log2(unsigned int n)
+ */
+ static void BitsPerByte(void)
+ {
+ bpb = 8;
+ }
+
++#ifdef __GNUC__
++#if (__GNUC__ > 2)
++__attribute__((noinline))
++#endif
++static int StackGrowthDirection(int *dummy1addr)
++{
++ int *dummy2 = alloca (sizeof (int));
++
++ return (dummy2 < dummy1addr) ? -1 : 1;
++}
++
++#else /* __GNUC__ */
++
+ static int StackGrowthDirection(int *dummy1addr)
+ {
+ int dummy2;
+
+ return (&dummy2 < dummy1addr) ? -1 : 1;
+ }
+
++#endif /* __GNUC__ */
++
+ int main(int argc, char **argv)
+ {
+ int sizeof_char, sizeof_short, sizeof_int, sizeof_int64, sizeof_long,
+ sizeof_float, sizeof_double, sizeof_word, sizeof_dword;
+ int bits_per_int64_log2, align_of_short, align_of_int, align_of_long,
+ align_of_int64, align_of_float, align_of_double, align_of_pointer,