From 76480b6b18868754fc95ff41d02885898c54367f Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Tue, 17 Apr 2012 20:37:01 -0300 Subject: Updating the cross toolchain for mips64el Added patches from upstream and diff'ed with them. Binutils and linux-libre-api-headers are already built. GCC Core builts but `mips64el-unknown-linux-gnu-gcc -v dummy.c` fails because of missing -EL on i686-pc-linux-gnu-as. Exporting mips64el-...-binutils to the PATH solves the problem but mips64el-...-ld fails with missing crt*. No idea why target gcc decides to use the host as instead of the target one, since the PKGBUILD hasn't fundamentally changed. --- .../glibc-2.15-arena.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-arena.patch (limited to 'cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-arena.patch') diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-arena.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-arena.patch new file mode 100644 index 000000000..46f52e98d --- /dev/null +++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-arena.patch @@ -0,0 +1,29 @@ +diff --git a/malloc/arena.c b/malloc/arena.c +index d3cf4b9..b1c9469 100644 +--- a/malloc/arena.c ++++ b/malloc/arena.c +@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size) + { + if (mp_.arena_max != 0) + narenas_limit = mp_.arena_max; +- else ++ else if (narenas > mp_.arena_test) + { + int n = __get_nprocs (); + +@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size) + } + repeat:; + size_t n = narenas; +- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0)) ++ /* NB: the following depends on the fact that (size_t)0 - 1 is a ++ very large number and that the underflow is OK. If arena_max ++ is set the value of arena_test is irrelevant. If arena_test ++ is set but narenas is not yet larger or equal to arena_test ++ narenas_limit is 0. There is no possibility for narenas to ++ be too big for the test to always fail since there is not ++ enough address space to create that many arenas. */ ++ if (__builtin_expect (n <= narenas_limit - 1, 0)) + { + if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n)) + goto repeat; -- cgit v1.2.3