summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/libatomic_ops
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/libatomic_ops')
-rw-r--r--dev-libs/libatomic_ops/Manifest7
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-fix-makefile-am-generic.patch19
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc-asm.patch11
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch46
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch59
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch43
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch43
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha6-x32.patch46
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-7.4.0-docs.patch19
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-1.1.ebuild19
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild29
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild27
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-7.2_alpha4.ebuild35
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-7.2_alpha6.ebuild35
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-7.2d.ebuild34
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-7.4.0.ebuild24
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-7.4.2.ebuild27
-rw-r--r--dev-libs/libatomic_ops/metadata.xml8
18 files changed, 531 insertions, 0 deletions
diff --git a/dev-libs/libatomic_ops/Manifest b/dev-libs/libatomic_ops/Manifest
new file mode 100644
index 000000000000..82f180044c7f
--- /dev/null
+++ b/dev-libs/libatomic_ops/Manifest
@@ -0,0 +1,7 @@
+DIST gc-7.2alpha4.tar.gz 1091329 SHA256 0b40a7a5d129e3028a3b1a7f0c6b9ae1d01aca14fe179c44cf10f4c5438649f9 SHA512 79c4439989c181add9b80467b1c19d2b61a5e7c510a84a61ee27017220ef56a2b0f4945a4e850019a6c0fe7a9cb3a982ef656b97d988d8e6f3c3fb8270a3e783 WHIRLPOOL 5f3445e8880df63077b11586334933a4c034d0e3b94c44cd585bf0d4b3fa1c8573252327b153ca6b7c9e04495ac3b91069b55fe90204844af569708e8a490b86
+DIST gc-7.2alpha6.tar.gz 1241386 SHA256 ebf425b254773d565e1690287641ed177716a78e952c96fec917edbc64535c16 SHA512 19e8cbb5d4698998a07725dedc204fd707ef3d47a0184129b418e4da44814f0016a834b6ac3766f754e76376441dfbad4b86e8e1b6ada8446f54e70f590628e4 WHIRLPOOL ed399a9cd4785d3d0b9090dce0591e7d8bdd93a5ce4ab0eeee1dba6cb1ae1392328df551f183d25200a0de7dcb93d526691f9b27391c9df49ee5a32643da7256
+DIST gc-7.2d.tar.gz 1263064 SHA256 d9fe0ae8650d43746a48bfb394cab01a319f3809cee19f8ebd16aa985b511c5e SHA512 5b342754a1efeef0cf78983b7a0e48a36495beac04fc881ab356b26dc153b343e940ec7af070f4fc875be44adc559f7be995919fe9229f68d2e0237cdbeaabcc WHIRLPOOL 441507f8d8a9ee6d19a25ef0a1b11068a60b15b40a5c484cc3133e48e7ed1c498ce7cc05924d34b0bb6a63f8cb437a696d66f45dca1e256e792f5180081b6051
+DIST libatomic_ops-1.1.tar.gz 178581 SHA256 f5fb0d89b5b26a7f0bb00c92463aeb62a425c491391bc7e36660a1ac0b5a1f13 SHA512 888efe425ee5e6a8008eb047dcb6db6577af73705a172010f1ef413510dfe8127977b37fe18a54be528ed3a0f0b1a7edc5e2ecc147fd6d9d3a7fe5ecaa9a1253 WHIRLPOOL c5c3c059f039de663965d030af3bd6c87e4fadd49b9a2740a96522f0ab68cefc6c39cf980fdd1d7d5b2aa2719172e13f8a122d3b77eb3eabd86ede15494c9f97
+DIST libatomic_ops-1.2.tar.gz 183780 SHA256 a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781 SHA512 b3eb524b900f3da46730b4b158e73897f0443269b78ea429812d91f1468d17cccbf15dfd522301724049fe73aced38bf1567aff7b680795da392760890ed83bf WHIRLPOOL 3d9887d167895d7f4c1066eb0fe4c09d2c3ce4852ad84e38a190cc92ef877fd060ef7f235a7470ca1da3bb58c02d5eb2dcfd2115c1c238c27265df844bb27673
+DIST libatomic_ops-7.4.0.tar.gz 455143 SHA256 2875ccc29254d3375dab9c5930c42df342f148f8cd7c646621dbf03f8c1d5b5a SHA512 3a2f6eac7c5f0fe0abaf8650047b8ec1c9c5abe732982a294a2afa920b588e17d64cb9f05a44be31b8cca9e52cc5ac79a26e1779bf60169c228344df4bbe86a9 WHIRLPOOL 32f213bddb235dc0657655d5320262a033d6f54a911077edddfa2d1c4f58568cd1e503cb2a305c0d3538c2c5d306efc4ac5d56f0fed510e6694883f093300e6b
+DIST libatomic_ops-7_4_2.tar.gz 115132 SHA256 2616be0a2f70f7e3eb12f131a36e32723ed5a1928f17b886c3e7c62f7ed14339 SHA512 3d06d5de930a369dd2af4413d8f573993eb927b45941ae8eba14ada91abd34a6baf31e1030d1ef6aa02bd6a2d8d59f9f306dd8dda6a68cf552a2745041111b2e WHIRLPOOL b2b90458b8bbc2660461c64f018c514652132cf65f7afd6a3719cd62fda95304523beff1ca4cab97cf730e25e3881bbaa3dc1e9b461a447b1956818c858b30ad
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-fix-makefile-am-generic.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-fix-makefile-am-generic.patch
new file mode 100644
index 000000000000..7b1f898ef9b6
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-fix-makefile-am-generic.patch
@@ -0,0 +1,19 @@
+diff -u -r a//doc/Makefile.am b//doc/Makefile.am
+--- a//doc/Makefile.am 2005-03-22 00:05:19.000000000 +0200
++++ b//doc/Makefile.am 2010-04-18 20:08:13.000000000 +0300
+@@ -1,3 +1,3 @@
+ # installed documentation
+ #
+-dist_pkgdata_DATA=COPYING LICENSING.txt README.txt COPYING README_stack.txt README_malloc.txt README_win32.txt
++dist_pkgdata_DATA=COPYING LICENSING.txt README.txt README_stack.txt README_malloc.txt README_win32.txt
+diff -u -r a//src/atomic_ops/sysdeps/Makefile.am b//src/atomic_ops/sysdeps/Makefile.am
+--- a//src/atomic_ops/sysdeps/Makefile.am 2005-09-28 02:53:16.000000000 +0300
++++ b//src/atomic_ops/sysdeps/Makefile.am 2010-04-18 20:04:03.000000000 +0300
+@@ -25,7 +25,6 @@
+ README \
+ \
+ gcc/alpha.h gcc/arm.h gcc/x86.h \
+- gcc/hppa.h gcc/ia64.h \
+ gcc/powerpc.h gcc/sparc.h \
+ gcc/hppa.h gcc/m68k.h gcc/s390.h \
+ gcc/ia64.h gcc/x86_64.h gcc/cris.h \
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc-asm.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc-asm.patch
new file mode 100644
index 000000000000..41171ed86e69
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc-asm.patch
@@ -0,0 +1,11 @@
+--- src/atomic_ops/sysdeps/gcc/powerpc.h 2006-03-29 09:49:14.000000000 +1100
++++ src/atomic_ops/sysdeps/gcc/powerpc.h 2007-08-27 10:51:00.000000000 +1000
+@@ -72,7 +72,7 @@
+ /* registers. I always got "impossible constraint" when I */
+ /* tried the "y" constraint. */
+ __asm__ __volatile__ (
+- "lwz %0,%1\n"
++ "lwz%X1 %0,%1\n"
+ "cmpw cr7,%0,%0\n"
+ "bne- cr7,1f\n"
+ "1: isync\n"
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch
new file mode 100644
index 000000000000..9b6baa188cf7
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch
@@ -0,0 +1,46 @@
+--- src/atomic_ops/sysdeps/gcc/powerpc.h.orig 2006-03-28 22:49:14.000000000 +0000
++++ src/atomic_ops/sysdeps/gcc/powerpc.h 2007-06-08 23:10:07.000000000 +0000
+@@ -63,6 +63,8 @@
+ /* seems to be that a data dependent branch followed by an isync is */
+ /* cheaper. And the documentation is fairly explicit that this also */
+ /* has acquire semantics. */
++/* ppc64 uses ld not lwz */
++#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+ AO_INLINE AO_t
+ AO_load_acquire(volatile AO_t *addr)
+ {
+@@ -72,7 +74,7 @@
+ /* registers. I always got "impossible constraint" when I */
+ /* tried the "y" constraint. */
+ __asm__ __volatile__ (
+- "lwz %0,%1\n"
++ "ld %0,%1\n"
+ "cmpw cr7,%0,%0\n"
+ "bne- cr7,1f\n"
+ "1: isync\n"
+@@ -80,7 +82,25 @@
+ : "m"(*addr) : "memory", "cc");
+ return result;
+ }
++#else
++AO_INLINE AO_t
++AO_load_acquire(volatile AO_t *addr)
++{
++ AO_t result;
+
++ /* FIXME: We should get gcc to allocate one of the condition */
++ /* registers. I always got "impossible constraint" when I */
++ /* tried the "y" constraint. */
++ __asm__ __volatile__ (
++ "lwz %0,%1\n"
++ "cmpw cr7,%0,%0\n"
++ "bne- cr7,1f\n"
++ "1: isync\n"
++ : "=r" (result)
++ : "m"(*addr) : "memory", "cc");
++ return result;
++}
++#endif
+ #define AO_HAVE_load_acquire
+
+ /* We explicitly specify store_release, since it relies */
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch
new file mode 100644
index 000000000000..4e8dd66a3554
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-sh4.patch
@@ -0,0 +1,59 @@
+--- libatomic_ops/src/atomic_ops.h
++++ libatomic_ops/src/atomic_ops.h
+@@ -228,6 +228,10 @@
+ # if defined(__cris__) || defined(CRIS)
+ # include "atomic_ops/sysdeps/gcc/cris.h"
+ # endif
++# if defined(__sh__) || defined(SH4)
++# include "atomic_ops/sysdeps/gcc/sh.h"
++# define AO_CAN_EMUL_CAS
++# endif /* __sh__ */
+ #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
+
+ #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
+only in patch2:
+unchanged:
+--- libatomic_ops/src/atomic_ops/sysdeps/Makefile.am
++++ libatomic_ops/src/atomic_ops/sysdeps/Makefile.am
+@@ -29,6 +29,7 @@
+ gcc/powerpc.h gcc/sparc.h \
+ gcc/hppa.h gcc/m68k.h gcc/s390.h \
+ gcc/ia64.h gcc/x86_64.h gcc/cris.h \
++ gcc/sh.h \
+ \
+ icc/ia64.h \
+ \
+--- libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h
++++ libatomic_ops/src/atomic_ops/sysdeps/gcc/sh.h
+@@ -0,0 +1,31 @@
++/*
++ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved.
++ *
++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
++ *
++ * Permission is hereby granted to use or copy this program
++ * for any purpose, provided the above notices are retained on all copies.
++ * Permission to modify the code and to distribute modified code is granted,
++ * provided the above notices are retained, and a notice that the code was
++ * modified is included with the above copyright notice.
++ */
++
++#include "../all_atomic_load_store.h"
++#include "../ordered.h"
++
++/* sh has tas.b(byte) only */
++#include "../test_and_set_t_is_char.h"
++
++AO_INLINE AO_TS_VAL_t
++AO_test_and_set_full(volatile AO_TS_t *addr)
++{
++ int oldval;
++ __asm__ __volatile__(
++ "tas.b @%1; movt %0"
++ : "=r" (oldval)
++ : "r" (addr)
++ : "t", "memory");
++ return oldval? AO_TS_CLEAR : AO_TS_SET;
++}
++#define AO_HAVE_test_and_set_full
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch
new file mode 100644
index 000000000000..2edc6958f360
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch
@@ -0,0 +1,43 @@
+http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e3a384578f677c05d812d99c2c92aa13670bd06a
+
+Upstream-Status: Pending
+
+Remove the `q' suffix on x86-64 atomic instructions.
+
+We don't need the `q' suffix on x86_64 atomic instructions for AO_t,
+which is defined as "unsigned long". "unsigned long" is 32bit for x32
+and 64bit for x86-64. The register operand in x86-64 atomic instructions
+is sufficient to properly determine the register size.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/02
+
+--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h.x32 2005-09-28 17:16:38.000000000 -0700
++++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h 2011-12-02 09:29:54.265251875 -0800
+@@ -60,7 +60,7 @@ AO_fetch_and_add_full (volatile AO_t *p,
+ {
+ AO_t result;
+
+- __asm__ __volatile__ ("lock; xaddq %0, %1" :
++ __asm__ __volatile__ ("lock; xadd %0, %1" :
+ "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+ : "memory");
+ return result;
+@@ -111,7 +111,7 @@ AO_int_fetch_and_add_full (volatile unsi
+ AO_INLINE void
+ AO_or_full (volatile AO_t *p, AO_t incr)
+ {
+- __asm__ __volatile__ ("lock; orq %1, %0" :
++ __asm__ __volatile__ ("lock; or %1, %0" :
+ "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+ }
+
+@@ -136,7 +136,7 @@ AO_compare_and_swap_full(volatile AO_t *
+ AO_t old, AO_t new_val)
+ {
+ char result;
+- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
++ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1"
+ : "=m"(*addr), "=q"(result)
+ : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+ return (int) result;
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch b/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch
new file mode 100644
index 000000000000..ac2b57fb1722
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch
@@ -0,0 +1,43 @@
+http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e3a384578f677c05d812d99c2c92aa13670bd06a
+
+Upstream-Status: Pending
+
+Remove the `q' suffix on x86-64 atomic instructions.
+
+We don't need the `q' suffix on x86_64 atomic instructions for AO_t,
+which is defined as "unsigned long". "unsigned long" is 32bit for x32
+and 64bit for x86-64. The register operand in x86-64 atomic instructions
+is sufficient to properly determine the register size.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/02
+
+--- a/src/atomic_ops/sysdeps/gcc/x86_64.h
++++ b/src/atomic_ops/sysdeps/gcc/x86_64.h
+@@ -56,7 +56,7 @@ AO_fetch_and_add_full (volatile AO_t *p,
+ {
+ AO_t result;
+
+- __asm__ __volatile__ ("lock; xaddq %0, %1" :
++ __asm__ __volatile__ ("lock; xadd %0, %1" :
+ "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+ : "memory");
+ return result;
+@@ -106,7 +106,7 @@ AO_int_fetch_and_add_full (volatile unsi
+ AO_INLINE void
+ AO_or_full (volatile AO_t *p, AO_t incr)
+ {
+- __asm__ __volatile__ ("lock; orq %1, %0" :
++ __asm__ __volatile__ ("lock; or %1, %0" :
+ "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+ }
+
+@@ -131,7 +131,7 @@ AO_compare_and_swap_full(volatile AO_t *
+ AO_t old, AO_t new_val)
+ {
+ char result;
+- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
++ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1"
+ : "=m"(*addr), "=q"(result)
+ : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+ return (int) result;
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha6-x32.patch b/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha6-x32.patch
new file mode 100644
index 000000000000..838e4a8d27f1
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha6-x32.patch
@@ -0,0 +1,46 @@
+Adopted from
+http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e3a384578f677c05d812d99c2c92aa13670bd06a
+
+Upstream-Status: Pending
+
+Remove the `q' suffix on x86-64 atomic instructions.
+
+We don't need the `q' suffix on x86_64 atomic instructions for AO_t,
+which is defined as "unsigned long". "unsigned long" is 32bit for x32
+and 64bit for x86-64. The register operand in x86-64 atomic instructions
+is sufficient to properly determine the register size.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/02
+
+diff --git a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
+index 0f68c1e..3bcde88 100644
+--- a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
++++ b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
+@@ -47,7 +47,7 @@ AO_fetch_and_add_full (volatile AO_t *p, AO_t incr)
+ {
+ AO_t result;
+
+- __asm__ __volatile__ ("lock; xaddq %0, %1" :
++ __asm__ __volatile__ ("lock; xadd %0, %1" :
+ "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+ : "memory");
+ return result;
+@@ -93,7 +93,7 @@ AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr)
+ AO_INLINE void
+ AO_or_full (volatile AO_t *p, AO_t incr)
+ {
+- __asm__ __volatile__ ("lock; orq %1, %0" :
++ __asm__ __volatile__ ("lock; or %1, %0" :
+ "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+ }
+ #define AO_HAVE_or_full
+@@ -123,7 +123,7 @@ AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val)
+ return (int)__sync_bool_compare_and_swap(addr, old, new_val);
+ # else
+ char result;
+- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
++ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1"
+ : "=m" (*addr), "=a" (result)
+ : "m" (*addr), "r" (new_val), "a" (old) : "memory");
+ return (int) result;
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-7.4.0-docs.patch b/dev-libs/libatomic_ops/files/libatomic_ops-7.4.0-docs.patch
new file mode 100644
index 000000000000..06c03677f605
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-7.4.0-docs.patch
@@ -0,0 +1,19 @@
+--- libatomic_ops-7.4.0/doc/Makefile.am
++++ libatomic_ops-7.4.0/doc/Makefile.am
+@@ -1,4 +1,4 @@
+ # installed documentation
+ #
+-dist_pkgdata_DATA=LICENSING.txt README.txt README_stack.txt \
++dist_doc_DATA=README.txt README_stack.txt \
+ README_malloc.txt README_win32.txt
+--- libatomic_ops-7.4.0/Makefile.am
++++ libatomic_ops-7.4.0/Makefile.am
+@@ -6,8 +6,6 @@
+ pkgconfig_DATA = pkgconfig/atomic_ops.pc
+ noinst_DATA = pkgconfig/atomic_ops-uninstalled.pc
+
+-dist_pkgdata_DATA = COPYING README.md
+-
+ EXTRA_DIST = autogen.sh
+
+ #distclean-local:
diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.1.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.1.ebuild
new file mode 100644
index 000000000000..201223bae498
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-1.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/research/linux/atomic_ops/download/${P}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 -x86 -x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake pkgdatadir="/usr/share/doc/${PF}" DESTDIR="${D}" install
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild
new file mode 100644
index 000000000000..c2f73ddba0b8
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/research/linux/atomic_ops/download/${P}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-ppc64-load_acquire.patch
+ epatch "${FILESDIR}"/${P}-ppc-asm.patch
+ epatch "${FILESDIR}"/${P}-sh4.patch
+ epatch "${FILESDIR}"/${P}-fix-makefile-am-generic.patch
+ epatch "${FILESDIR}"/${P}-x32.patch
+ eautoreconf
+}
+
+src_install() {
+ emake pkgdatadir="${EPREFIX}/usr/share/doc/${PF}" DESTDIR="${D}" install || die
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild
new file mode 100644
index 000000000000..ebd26ec0ff12
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/research/linux/atomic_ops/download/${P}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-ppc64-load_acquire.patch
+}
+
+src_install() {
+ emake pkgdatadir="/usr/share/doc/${PF}" DESTDIR="${D}" install || die
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha4.ebuild b/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha4.ebuild
new file mode 100644
index 000000000000..3ed5a8a2624e
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${PV/_}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/gc-${PV/_}/libatomic_ops
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.2_alpha4-x32.patch
+ sed -i \
+ -e "/^pkgdatadir/s:/.*:/doc/${PF}:" \
+ doc/Makefile.in || die
+ find -type f -exec touch -r . {} +
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ find "${ED}" '(' -name COPYING -o -name LICENSING.txt ')' -delete
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha6.ebuild b/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha6.ebuild
new file mode 100644
index 000000000000..034fc8efaa72
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-7.2_alpha6.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${PV/_}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/gc-${PV/_}/libatomic_ops
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-x32.patch
+ sed -i \
+ -e "/^pkgdatadir/s:/.*:/doc/${PF}:" \
+ doc/Makefile.in || die
+ find -type f -exec touch -r . {} +
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ find "${ED}" '(' -name COPYING -o -name LICENSING.txt ')' -delete
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-7.2d.ebuild b/dev-libs/libatomic_ops/libatomic_ops-7.2d.ebuild
new file mode 100644
index 000000000000..15d79eb42a2a
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-7.2d.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${PV/_}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/gc-${PV/d}/libatomic_ops
+
+src_prepare() {
+ sed -i \
+ -e "/^pkgdatadir/s:/.*:/doc/${PF}:" \
+ doc/Makefile.in || die
+ find -type f -exec touch -r . {} +
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ find "${ED}" '(' -name COPYING -o -name LICENSING.txt ')' -delete
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-7.4.0.ebuild b/dev-libs/libatomic_ops/libatomic_ops-7.4.0.ebuild
new file mode 100644
index 000000000000..6dd372650f32
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-7.4.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/"
+SRC_URI="http://www.hpl.hp.com/research/linux/atomic_ops/download/${P}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-docs.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
diff --git a/dev-libs/libatomic_ops/libatomic_ops-7.4.2.ebuild b/dev-libs/libatomic_ops/libatomic_ops-7.4.2.ebuild
new file mode 100644
index 000000000000..5ce444299494
--- /dev/null
+++ b/dev-libs/libatomic_ops/libatomic_ops-7.4.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${PN}-${PV//./_}
+DESCRIPTION="Implementation for atomic memory update operations"
+HOMEPAGE="https://github.com/ivmai/libatomic_ops/"
+SRC_URI="https://github.com/ivmai/${PN}/archive/${MY_P}.tar.gz"
+
+LICENSE="MIT boehm-gc GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/${PN}-${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.4.0-docs.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF}
+}
diff --git a/dev-libs/libatomic_ops/metadata.xml b/dev-libs/libatomic_ops/metadata.xml
new file mode 100644
index 000000000000..45883ebb6e92
--- /dev/null
+++ b/dev-libs/libatomic_ops/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sound</herd>
+ <upstream>
+ <remote-id type="github">ivmai/libatomic_ops</remote-id>
+ </upstream>
+</pkgmetadata>