From c86957aeb8ee30ca4a626c68fd2a70f7706fceac Mon Sep 17 00:00:00 2001 From: Juro Bystricky Date: Thu, 29 Oct 2015 13:43:38 -0700 Subject: glibc: Allow 64 bit atomics for x86 The fix consist of allowing 64bit atomic ops for x86. This should be safe for i586 and newer CPUs. It also makes the synchronization more efficient. [YOCTO #8140] (From OE-Core rev: 2b8c7aa51f6ac7f79c4834e04b697c04afc8beaf) Signed-off-by: Juro Bystricky Signed-off-by: Richard Purdie --- .../glibc/glibc/use_64bit_atomics.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/use_64bit_atomics.patch (limited to 'meta/recipes-core/glibc/glibc') diff --git a/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch b/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch new file mode 100644 index 0000000000..eb7f2b29be --- /dev/null +++ b/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch @@ -0,0 +1,24 @@ +This patch alows using 64 bit atomic instructions on a +32 bit platform. This is safe, providing x86 is Pentium or +later (would not work on i386, i486). Using 64 bit atomic +instructions bypasses code containing a bug as documented in +https://bugzilla.yoctoproject.org/show_bug.cgi?id=8140 + +Upstream-Status: TBD + +Signed-off-by: Juro Bystricky + + +Index: libc/sysdeps/i386/i486/bits/atomic.h +=================================================================== +--- libc.orig/sysdeps/i386/i486/bits/atomic.h ++++ libc/sysdeps/i386/i486/bits/atomic.h +@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t; + # endif + #endif + +-#define __HAVE_64B_ATOMICS 0 ++#define __HAVE_64B_ATOMICS 1 + #define USE_ATOMIC_COMPILER_BUILTINS 0 + + -- cgit v1.2.3-54-g00ecf