diff options
| author | Scott Garman <scott.a.garman@intel.com> | 2010-11-29 20:47:12 -0800 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-12-06 22:02:19 +0000 |
| commit | 34329848a7e697d55120ab5dad09cf4866b199b9 (patch) | |
| tree | fa6be927020c703004482f5fbda92e8fb76d6f5d | |
| parent | 1f427822e3c34bf24fa4b4a511c30c0f6d72774e (diff) | |
| download | poky-34329848a7e697d55120ab5dad09cf4866b199b9.tar.gz | |
libatomics-ops: recipe updates, fix build for mips
* Added another patch from Gentoo/OE to allow package to build for
mips arches
* Added SUMMARY, HOMEPAGE, and SECTION fields
* Added source checksums
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
| -rw-r--r-- | meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch | 125 | ||||
| -rw-r--r-- | meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb | 17 |
2 files changed, 137 insertions, 5 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch b/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch new file mode 100644 index 0000000000..29f07b9f99 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops/gentoo/libatomic_ops-1.2-mips.patch | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | # Patch copied from the OpenEmbedded libatomics-ops recipe. Original | ||
| 2 | # source was from Gentoo. | ||
| 3 | # | ||
| 4 | # Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
| 5 | diff --git a/src/atomic_ops.h b/src/atomic_ops.h | ||
| 6 | index c23f30b..791b360 100755 | ||
| 7 | --- a/src/atomic_ops.h | ||
| 8 | +++ b/src/atomic_ops.h | ||
| 9 | @@ -220,6 +220,9 @@ | ||
| 10 | # if defined(__cris__) || defined(CRIS) | ||
| 11 | # include "atomic_ops/sysdeps/gcc/cris.h" | ||
| 12 | # endif | ||
| 13 | +# if defined(__mips__) | ||
| 14 | +# include "atomic_ops/sysdeps/gcc/mips.h" | ||
| 15 | +# endif | ||
| 16 | #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */ | ||
| 17 | |||
| 18 | #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS) | ||
| 19 | diff --git a/src/atomic_ops/sysdeps/Makefile.am b/src/atomic_ops/sysdeps/Makefile.am | ||
| 20 | index 74122b4..d6737c0 100644 | ||
| 21 | --- a/src/atomic_ops/sysdeps/Makefile.am | ||
| 22 | +++ b/src/atomic_ops/sysdeps/Makefile.am | ||
| 23 | @@ -29,6 +29,7 @@ nobase_sysdep_HEADERS= generic_pthread.h \ | ||
| 24 | gcc/powerpc.h gcc/sparc.h \ | ||
| 25 | gcc/hppa.h gcc/m68k.h gcc/s390.h \ | ||
| 26 | gcc/ia64.h gcc/x86_64.h gcc/cris.h \ | ||
| 27 | + gcc/mips.h \ | ||
| 28 | \ | ||
| 29 | icc/ia64.h \ | ||
| 30 | \ | ||
| 31 | diff --git a/src/atomic_ops/sysdeps/gcc/mips.h b/src/atomic_ops/sysdeps/gcc/mips.h | ||
| 32 | new file mode 100644 | ||
| 33 | index 0000000..e7f3a5d | ||
| 34 | --- /dev/null | ||
| 35 | +++ b/src/atomic_ops/sysdeps/gcc/mips.h | ||
| 36 | @@ -0,0 +1,89 @@ | ||
| 37 | +/* | ||
| 38 | + * Copyright (c) 2005 Thiemo Seufer <ths@networkno.de> | ||
| 39 | + * Copyright (c) 2007 Zhang Le <r0bertz@gentoo.org> | ||
| 40 | + * | ||
| 41 | + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED | ||
| 42 | + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | ||
| 43 | + * | ||
| 44 | + * Permission is hereby granted to use or copy this program | ||
| 45 | + * for any purpose, provided the above notices are retained on all copies. | ||
| 46 | + * Permission to modify the code and to distribute modified code is granted, | ||
| 47 | + * provided the above notices are retained, and a notice that the code was | ||
| 48 | + * modified is included with the above copyright notice. | ||
| 49 | + */ | ||
| 50 | + | ||
| 51 | +#include "../all_aligned_atomic_load_store.h" | ||
| 52 | +#include "../test_and_set_t_is_ao_t.h" | ||
| 53 | + | ||
| 54 | +/* Data dependence does not imply read ordering. */ | ||
| 55 | +#define AO_NO_DD_ORDERING | ||
| 56 | + | ||
| 57 | +AO_INLINE void | ||
| 58 | +AO_nop_full() | ||
| 59 | +{ | ||
| 60 | + __asm__ __volatile__( | ||
| 61 | + " .set push \n" | ||
| 62 | + " .set mips3 \n" | ||
| 63 | + " .set noreorder \n" | ||
| 64 | + " .set nomacro \n" | ||
| 65 | + " sync \n" | ||
| 66 | + " .set pop " | ||
| 67 | + : : : "memory"); | ||
| 68 | +} | ||
| 69 | + | ||
| 70 | +#define AO_HAVE_nop_full | ||
| 71 | + | ||
| 72 | +AO_INLINE int | ||
| 73 | +AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) | ||
| 74 | +{ | ||
| 75 | + register int was_equal = 0; | ||
| 76 | + register int temp; | ||
| 77 | + | ||
| 78 | + __asm__ __volatile__( | ||
| 79 | + " .set push \n" | ||
| 80 | + " .set mips3 \n" | ||
| 81 | + " .set noreorder \n" | ||
| 82 | + " .set nomacro \n" | ||
| 83 | + "1: ll %0, %1 \n" | ||
| 84 | + " bne %0, %4, 2f \n" | ||
| 85 | + " move %0, %3 \n" | ||
| 86 | + " sc %0, %1 \n" | ||
| 87 | + " .set pop \n" | ||
| 88 | + " beqz %0, 1b \n" | ||
| 89 | + " li %2, 1 \n" | ||
| 90 | + "2: " | ||
| 91 | + : "=&r" (temp), "+R" (*addr), "+r" (was_equal) | ||
| 92 | + : "r" (new_val), "r" (old) | ||
| 93 | + : "memory"); | ||
| 94 | + return was_equal; | ||
| 95 | +} | ||
| 96 | + | ||
| 97 | +#define AO_HAVE_compare_and_swap | ||
| 98 | + | ||
| 99 | +AO_INLINE AO_t | ||
| 100 | +AO_fetch_and_add_full (volatile AO_t *p, AO_t incr) | ||
| 101 | +{ | ||
| 102 | + AO_t result, temp; | ||
| 103 | + __asm__ __volatile__( | ||
| 104 | + " .set push \n" | ||
| 105 | + " .set mips3 \n" | ||
| 106 | + " .set noreorder \n" | ||
| 107 | + " .set nomacro \n" | ||
| 108 | + "1: ll %1, %2 \n" | ||
| 109 | + " addu %0, %1, %3 \n" | ||
| 110 | + " sc %0, %2 \n" | ||
| 111 | + " beqz %0, 1b \n" | ||
| 112 | + " addu %0, %1, %3 \n" | ||
| 113 | + " sync \n" | ||
| 114 | + " .set pop \n" | ||
| 115 | + : "=&r" (result), "=&r" (temp), "=m" (*p) | ||
| 116 | + : "r" (incr), "m" (*p) | ||
| 117 | + : "memory"); | ||
| 118 | + return result; | ||
| 119 | +} | ||
| 120 | + | ||
| 121 | +#define AO_HAVE_fetch_and_add_full | ||
| 122 | + | ||
| 123 | +/* | ||
| 124 | + * FIXME: fetch_and_add_full implemented, any others? | ||
| 125 | + */ | ||
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb index 0160c3dea8..79f4517476 100644 --- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb +++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb | |||
| @@ -1,13 +1,20 @@ | |||
| 1 | SUMMARY = "A library for atomic integer operations" | ||
| 1 | DESCRIPTION = "A library for atomic integer operations" | 2 | DESCRIPTION = "A library for atomic integer operations" |
| 3 | HOMEPAGE = "http://www.hpl.hp.com/research/linux/atomic_ops/" | ||
| 4 | SECTION = "optional" | ||
| 2 | LICENSE = "GPLv2&MIT" | 5 | LICENSE = "GPLv2&MIT" |
| 3 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | 6 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 4 | file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \ | 7 | file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \ |
| 5 | " | 8 | " |
| 6 | PR = "r4" | 9 | PR = "r5" |
| 7 | 10 | ||
| 8 | SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-1.2.tar.gz \ | 11 | SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ |
| 9 | file://fedora/libatomic_ops-1.2-ppclwzfix.patch;patch=1 \ | 12 | file://fedora/libatomic_ops-1.2-ppclwzfix.patch \ |
| 10 | file://doublefix.patch;patch=1" | 13 | file://gentoo/libatomic_ops-1.2-mips.patch \ |
| 14 | file://doublefix.patch" | ||
| 15 | |||
| 16 | SRC_URI[md5sum] = "1b65e48271c81e3fa2d7a9a69bab7504" | ||
| 17 | SRC_URI[sha256sum] = "a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781" | ||
| 11 | 18 | ||
| 12 | S = "${WORKDIR}/libatomic_ops-${PV}" | 19 | S = "${WORKDIR}/libatomic_ops-${PV}" |
| 13 | 20 | ||
