summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2015-10-29 13:43:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-29 22:09:39 +0000
commit2b8c7aa51f6ac7f79c4834e04b697c04afc8beaf (patch)
tree97e0f7b5caa95b6990dcb11d85ede907e508285b /meta
parent6dd28030f323d7106a02ec54ce4e249561ab0836 (diff)
downloadopenembedded-core-2b8c7aa51f6ac7f79c4834e04b697c04afc8beaf.tar.gz
openembedded-core-2b8c7aa51f6ac7f79c4834e04b697c04afc8beaf.tar.bz2
openembedded-core-2b8c7aa51f6ac7f79c4834e04b697c04afc8beaf.zip
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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/glibc/glibc/use_64bit_atomics.patch24
-rw-r--r--meta/recipes-core/glibc/glibc_2.22.bb1
2 files changed, 25 insertions, 0 deletions
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 <juro.bystricky@intel.com>
+
+
+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
+
+
diff --git a/meta/recipes-core/glibc/glibc_2.22.bb b/meta/recipes-core/glibc/glibc_2.22.bb
index 020e417dd5..2494ad7d97 100644
--- a/meta/recipes-core/glibc/glibc_2.22.bb
+++ b/meta/recipes-core/glibc/glibc_2.22.bb
@@ -50,6 +50,7 @@ SRC_URI_append_class-nativesdk = "\
file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+ file://use_64bit_atomics.patch \
"
S = "${WORKDIR}/git"